我得到這個代碼:如何獲得多維數組的回聲?
$Wanteds[] = array(
'WantedLevel' => 1,
'WantedName' => "Nichtbefolgen",
'WantedPreis' => 300
);
$Wanteds[] = array(
'WantedLevel' => 1,
'WantedName' => "Beihilfe",
'WantedPreis' => 200
);
$Wanteds[] = array(
'WantedLevel' => 2,
'WantedName' => "Dealen",
'WantedPreis' => 500
);
現在,我tryed得到它到一個變量:
echo "TESTING: $Wanteds[0][WantedName] <br />";
所有我知道了:測試:[WantedName] 代替:測試:Nichtbefolgen
請記住:我不熟悉數組和編程。 :)
同樣在這裏:字符串似乎是空的:( – LuckyLuke
你可以在你的頁面啓用錯誤,看看發生了什麼error_reporting(E_ALL); ini_set('display_errors','1'); –
謝謝你的剪報!我得到了很多錯誤,好吧,讓我們繼續: – LuckyLuke