日期:2014-05-17 浏览次数:20513 次
$str = <<<EOF
{'aid':'21','ctl_a_cpu':'df','ctl_a_ram':'df','ctl_a_disk':'df','ctl_a_fip':'df','ctl_a_os':'c_1_2','ctl_a_os_lang':'c_4_1,c_4_3','comment':'其它要求\',\'呵呵\',\'','total':'1090','typeid':'6'}
EOF;
$ar = explode("','", substr($str, 2, -2));
$result = '';
foreach($ar as $v) {
$ar_tmp = explode("':'", $v);
$result[$ar_tmp[0]] = $ar_tmp[1];
}
echo '<pre>';
print_r($result);