Page 1 of 1

arrays

Posted: Tue Jun 07, 2005 4:32 am
by gurjit
Hi All,

how can reset an arrays key to start from zero:

e.g.

at the beginning i had


[0] = ''
[1] = 'a'
[2] = 'b'
[3] = ''

so i did the following

Code: Select all

<?php
$start_mm = array_diff($start_mm, array(''));
?>
which took out all the blanks and now i want the array to reset the keys to say
[0] = 'a'
[1] = 'b'

Posted: Tue Jun 07, 2005 5:33 am
by CoderGoblin