I have this situation:
A db table 'pageitems' with
zone | text
------------
ZONE1 text1
ZONE2 text2
ZONE3 text3
ZONE3 text4
and inside a foreach loop like this
foreach($pageitems as $items) {
...
}
I want to obtain an array like this
Array
(
[ZONE1] => Array(
[0] => text1
)
[ZONE2] => Array
(
[0] => text2
)
[ZONE3] => Array
(
[0] => text3,
[1] => text4
)
)
How to obtain this? Thanks