如何将语法表解码为PHP数组


How to decode the syntax table to PHP array

如何在PHP数组中解码以下语法:

{
'Property': {
'Lang', 'en'
, 'Make': function () {
// Do something
}
}
}

其中"Make"的值属于string 类型

终于得到了一张这样的桌子:

echo $ array ['property'] [ 'lang']; // String
echo $ array ['property'] [ 'Make']; // String

请注意:这不是我使用的标准JSON,请参阅Make属性。

你指的是函数json_decode()吗您可以在这里阅读更多信息:

http://www.php.net/manual/en/function.json-decode.php

您可以使用json_decode();在您的代码中。

json_decode($json_result);

"$json_result"json类型的数据。

据您所知http://www.php.net/manual/en/function.json-decode.php