当前位置:Gxlcms > PHP教程 > 如何把这段url转换成应格式数组?

如何把这段url转换成应格式数组?

时间:2021-07-01 10:21:17 帮助过:2人阅读

fid=8&type=1&hot=2&other=6&page=3



Array
(
[fid] => 8
[type] => 1
[hot] => 2
[other] => 6
[page] => 3
)


回复讨论(解决方案)

parse_str('fid=8&type=1&hot=2&other=6&page=3', $a);print_r($a);
Array
(
[fid] => 8
[type] => 1
[hot] => 2
[other] => 6
[page] => 3
)

谢谢版主,我还不知道有这个函数

人气教程排行