1
我有這種情況:PHP動態數組創建
一個數據庫表 'pageitems' 與
zone | text
------------
ZONE1 text1
ZONE2 text2
ZONE3 text3
ZONE3 text4
和foreach循環這樣
foreach($pageitems as $items) {
...
}
裏面我想獲得一個數組像這樣
Array
(
[ZONE1] => Array(
[0] => text1
)
[ZONE2] => Array
(
[0] => text2
)
[ZONE3] => Array
(
[0] => text3,
[1] => text4
)
)
如何使用ob這個嗎? 感謝