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这个吗? 感谢