I want to convert my result array to JSON format in PHP. Here is my code:
$row = mysql_fetch_array($result)
我想将$row
转换为JSON格式,并将JSON数据传递给jQuery插件.
I want to convert my result array to JSON format in PHP. Here is my code:
$row = mysql_fetch_array($result)
我想将$row
转换为JSON格式,并将JSON数据传递给jQuery插件.
json_encode
is available in php > 5.2.0:
echo
json_encode
($row);