If what you want is to have a continuos secuential array (i.e. 0=>x,
1=>a, 2=>f) and there's no need for sorting the values, then you need
array_values()[1]
[1] http://php.net/array-values
suresh kumar wrote:
I am facing one project in my project .
this is my code:
a=array(0=>10,1=>10,2=>20,3=>30,4=>30,5=>40);
b=array();
b=array_unique($a);
print_r($b);
o/p getting from above code is b[0]=10,b[2]=20,b[3]=30,b[5]=40;
but i want the o/p be b[0]=10,b[1]=20,b[2]=30,b[3]=40;
> i searched php.net .i am not able to fine any solution.i am breaking
> my head for last 5 hours.i am waiting reply from any one
--
Atentamente,
J. Rafael Salazar Magaña
Innox - Innovación Inteligente
Tel: +52 (33) 3615 5348 ext. 205 / 01 800 2-SOFTWARE
http://www.innox.com.mx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php