1
0
moha/webserver/utils.php
2022-04-23 02:00:52 +02:00

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;
}
?>