url拼接有没有函数可以直接完成的?
程序员文章站
2022-05-16 22:50:16
...
array(
'url' => '111',
'desc' => '123',
'type' => 'share',
'showcount' => '',
);
转换成:
url=111&desc=123&type=share&showcount=
'url' => '111',
'desc' => '123',
'type' => 'share',
'showcount' => '',
);
转换成:
url=111&desc=123&type=share&showcount=
回复内容:
array(
'url' => '111',
'desc' => '123',
'type' => 'share',
'showcount' => '',
);
转换成:
url=111&desc=123&type=share&showcount=
$data = array( 'foo' => 'bar' ,
'baz' => 'boom' ,
'cow' => 'milk' ,
'php' => 'hypertext processor' );
echo http_build_query ( $data ) ;
//foo=bar&baz=boom&cow=milk&php=hypertext+processor
上一篇: php查询mysql大量数据造成内存不足的解决方法
下一篇: 大型系统上PHP令人不爽的九大原因