- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
function json2array($json){
if(get_magic_quotes_gpc()){
$json = stripslashes($json);
}
$json = substr($json, 1, -1);
$json = str_replace(array(":", "{", "[", "}", "]"), array("=>", "array(", "array(", ")", ")"), $json);
@eval("\$json_array = array({$json});");
return $json_array;
}