unset multidimensional array element [message #180526] |
Sun, 24 February 2013 00:18 |
cate
Messages: 12 Registered: January 2012
Karma:
|
Junior Member |
|
|
Is this correct?
I remove an element from a multidee array. Numeric Indexing then
fails because the it's no longer 0, 1, 2 but instead 0, 2 after the
unset. It seems the a numeric index has graduated to a key. (I
think I read that's the way php works)
Do I have to repack this to get sequential indexing to work or is
there a php way to remove elements and maintain a "numeric" indexs?
I suppose I could make it a rule to use the construct foreach, but I
do so love for(;;).
Thank you in advance.
array (
array (1, 2, 3),
array (4, 5, 6),
array (7, 8, 9)
)
|
|
|