17 lines
267 B
PHP
17 lines
267 B
PHP
|
<?php
|
||
|
|
||
|
function jsonDecode($json)
|
||
|
{
|
||
|
$jsonArray = array();
|
||
|
$json = trim($json, " {[]}");
|
||
|
$tmp = explode(",", $json);
|
||
|
foreach($tmp as $value)
|
||
|
{
|
||
|
$tmp2 = explode (":" , $value);
|
||
|
$jsonArray[trim($tmp2[0], '"')] = trim($tmp2[1], '"');
|
||
|
}
|
||
|
return $jsonArray;
|
||
|
}
|
||
|
|
||
|
?>
|