怎么把这段url 转换成应格式数组
程序员文章站
2024-01-30 13:16:52
...
如何把这段url 转换成应格式数组?
fid=8&type=1&hot=2&other=6&page=3
Array
(
[fid] => 8
[type] => 1
[hot] => 2
[other] => 6
[page] => 3
)
------解决方案--------------------
(
[fid] => 8
[type] => 1
[hot] => 2
[other] => 6
[page] => 3
)
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);Array
print_r($a);
(
[fid] => 8
[type] => 1
[hot] => 2
[other] => 6
[page] => 3
)
相关文章
相关视频
上一篇: PHP常用处理静态操作类_php实例
下一篇: php论坛,比上回好很多