0
我想創建一個多維關聯數組並顯示其所有值。PHP回聲關聯多維數組
如何使用for循環做到這一點?
類似代碼:
$StudScore = array(
"Mary" => array(
"physics" => 35,
"maths" => 30,
"chemistry" => 39
),
"Tom" => array(
"physics" => 30,
"maths" => 32,
"chemistry" => 29
),
"Jon" => array(
"physics" => 31,
"maths" => 22,
"chemistry" => 39
)
);
使用foreach循環數組 – jayxhj
如果你只是想顯示一個數組(或任何變量)的內容,使用[var_dump](http://php.net/var_dump) – Terminus