-3
Array
(
[0] => Array
(
[Poll] => Array
(
[id] => 1
[question] => What's your favourite linux distribution ?
[mark] => 1
[created] => 2011-09-05 20:30:57
[modified] => 2011-09-05 20:30:57
)
)
[1] => Array
(
[Poll] => Array
(
[id] => 2
[question] => What's your favourite editor ?
[mark] => 1
[created] => 2011-09-05 20:31:59
[modified] => 2011-09-05 20:31:59
)
)
)
我想這樣=>如何從另一個php數組創建php哈希數組?
[Poll] => Array
(
[id] => 1
[question] => What's your favourite linux distribution ?
[mark] => 1
[created] => 2011-09-05 20:30:57
[modified] => 2011-09-05 20:30:57
)
[Poll] => Array
(
[id] => 2
[question] => What's your favourite editor ?
[mark] => 1
[created] => 2011-09-05 20:31:59
[modified] => 2011-09-05 20:31:59
)
陣列是否有任何PHP函數來做到這一點或任何快捷方式? 我知道關於foreach循環。
*(參考)* http://php.net/manual/en/language.types.array.php – Gordon
和http://php.net/manual/en/control-structures.foreach.php – mario