日期:2014-05-17 浏览次数:20493 次
$var = "a=1,b=2,c='da,=cheng'"; $arr=preg_split('/,(?=\w)/',$var,-1,PREG_SPLIT_NO_EMPTY); foreach($arr as $v){ $t=explode('=',$v,2); $ar[$t[0]]=$t[1]; } print_r($ar);