0
我有這個迄今爲止JSON輸出:創建使用PHP
if (is_request_var('requestor') == 'PPA'){
$dataJson[][] = array("status" => "success","value" => $fetchValue ,"postcode" => $fetchPostCode,"params"=>"");
$notice = $dataJson;
}
我想從PHP(如下所述)我如何安排我的PHP陣列碼
jQuery191013316784294951245_1485527378760([
{
"value": "\u003cstrong\u003eNAIROBI\u003c/strong\u003e KENYATTA AVENUE, GENERAL POST OFFICE, 00100",
"postcode": "00100"
},
{
"value": "\u003cstrong\u003eNAIROBI\u003c/strong\u003e HAILE SALASSIE AVENUE, CITY SQUARE, QLD, 00200",
"postcode": "00200"
}
])
您應該使用json_encode函數:json_encode(陣列( 「狀態」=> .....並返回 – rescobar
@rescobar會還給我希望我的JSON數據格式 –
@菲利普的方式? W Mars,它將返回一個值的JSON表示,在這種情況下是一個數組。 – rescobar