-2
我在android中創建了一個JSON字符串/對象/數組,並將它傳遞給PHP。Android PHP - 獲取數組鍵值
PHP代碼段,結果如下:
if(isset($_POST['finalobject']))
{
$finalobject = $_POST['finalobject'];
error_log("\n ###### finalobjectpost: " . $finalobject ,3,"android_post_array.log");
}
finalobjectpost結果:
{"myarray":[{"id":0,"name":0,"year":0,"curriculum":0,"birthday":0},{"id":1,"name":1,"year":1,"curriculum":1,"birthday":1}]}
我需要foreach循環來顯示鍵頭,即ID,NAME,年份等
我已經使用瞭解碼和foreach,仍然無法獲得他以上最終對象的關鍵值。 – user6804473