{
"6cb20a9f-27fa-4d98-ac2e-e959eb3f0f63": {
"file": "",
"title": "",
"link": "",
"target": "0",
"rel": ""
},
"43aa1b15-986e-4303-afcf-628b835f10e5": {
"0": {
"value": "<p>This is an example description.<\/p>"
}
},
"97dacf42-398b-45c5-8536-baec4250b27e": {
"0": {
"value": "2012-10-19 00:00:00"
}
},
"20fec805-ebb1-4045-9f3d-ea90ad952e91": {
"0": {
"value": "A restaurant"
}
}
}
所以在使用PHP时,它看起来像这样:
我可以做些什么来避免\ n和\ t,因为我将此解析发送到iphone应用程序并且它无法识别它。谢谢!
PHP代码是这样的:
<?php>
$link = mysql_pconnect("localhost", "root", "") or die("Could not connect");
mysql_select_db("test") or die("Could not select database");
$arr = array();
$rs = mysql_query("SELECT * FROM people");
while($obj = mysql_fetch_object($rs)) {$arr[] = $obj;
}
echo '{"members":'.json_encode($arr).'}';
?>