php http_build_query()方法拼接查询字符串
php http_build_query()方法拼接查询字符串 [代码片段(19行)]
<html> <head> <title>Using http_build_query() to Build Query Strings</title> </head> <body> <?php $q = array ( 'name' => 'Tom', 'interest' => 'Movie', 'homepage' => 'http://www.example.com' ); $query = http_build_query( $q ); print $query; ?> <p> <a href='anotherpage.php?<?php print $query ?>'>Go!</a> </p> </body> </html>
- 上一篇:php队列处理
- 下一篇:php导出mysql数据到excel文件
精彩图集
精彩文章