时间:2021-07-01 10:21:17 帮助过:8人阅读
$str = <<{'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 '';
print_r($result);