Rearranging arrays
Posted: Fri Apr 07, 2006 5:05 am
Is it possible to change a higher level index without changing any of its sub levels? Such as this:
There is probably a function for this, but searching through the PHP manual on arrays I couldn't find anything 
Thanks,
someberry
Code: Select all
Starting with
-------------
Array
(
[0] => array_name_1
(
[0] => some value 1
[1] => some value 2
)
[1] => array_name_2
(
[0] => some value 3
[1] => some value 4
)
}
Ending with
-----------
Array
(
[0] => NEW_array_name_1
(
[0] => some value 1
[1] => some value 2
)
[1] => NEW_array_name_2
(
[0] => some value 3
[1] => some value 4
)
}Thanks,
someberry