时间:2021-07-01 10:21:17 帮助过:8人阅读
$str = 'qq=xxx&ww=qqqqq&m=15010101817&rf=qwqw&ip=192.168.1.1 ';
$arr = explode('&', $str);
foreach($arr as $k=>$v){
$res[$k] = explode('=', $v);
$ret[] = $res[$k][1];
}
print_r($ret);
$s = 'qq=xxx&ww=qqqqq&m=15010101817&rf=qwqw&ip=192.168.1.1';
parse_str($s, $a);
print_r($a);
Array
(
[qq] => xxx
[ww] => qqqqq
[m] => 15010101817
[rf] => qwqw
[ip] => 192.168.1.1
)