I have a array
Array (
[1] => Vice President
[3] => Secretary
[5] => Treasurer
)
I want make it change to
Array (
[0] => Vice President
[1] => Secretary
[2] => Treasurer
)
I have try us php for loop function
$ub_new_arr_sort = array();
for ($i3 = 0; $i3 < count($ub_new_arr); $i3++) {
$ub_new_arr_sort[] = $ub_new_arr[$i3];
}
but seem like not work at all, any idea?
0..2. However, the array used the indexes1,3, and5. Theforeachconstruct would have worked, although @Francois Deschenes' answer is more elegant, IMO.