时间:2021-07-01 10:21:17 帮助过:56人阅读
parse_str
$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)
原来有专门的函数 多谢指教
这么点分不够分 望见谅