把字符串*id=3,express_no=25,ename=quanri,*id=4,express_no=17,ename=kuaidi,
转变成数组array(array(id=3,express_no=25,ename=quanri),array(id=4,express_no=17,ename=kuaidi))
------解决方案--------------------
- PHP code
$s = "*id=3,express_no=25,ename=quanri,*id=4,express_no=17,ename=kuaidi,"; $t = array(); foreach(explode('*', $s) as $v) { if(empty($v)) continue; parse_str(str_replace(',', '&', $v), $t); $r[] = $t; } print_r($r);