0
我試圖獲得iPhone正確的JSON輸出我使用的代碼:正確的JSON輸出中iPhone json_encode
<?php
$post = array('items' => 1, 'title' => message, 'description' => description);
echo json_encode($post);
?>
,輸出是:
{"items":1,"title":"message","description":"description"}
但我想要一個輸出與[
{
"items": [
{
"title": "message",
"description": "description"
}
]
}
有人可以告訴我該怎麼做嗎?
警告:英雄。 :) – Frenck 2012-03-02 18:01:23