re-arrange php array -


i have array

array ( [1] => vice president [3] => secretary [5] => treasurer )  

i want make change

array ( [0] => vice president [1] => secretary [2] => treasurer )  

i have try php 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 not work @ all, idea?

thanks advance.

just use array_values.

$array = array_values($array); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -