Re: [PHP] unique array problem

2006-04-22 Thread Paul Novitski
At 03:21 AM 4/22/2006, 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

[PHP] unique array problem

2006-04-22 Thread suresh kumar
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;

RE: [PHP] Unique Array

2001-09-10 Thread Mark Roedel
> -Original Message- > From: Deirdre Mc Cann [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 6:30 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Unique Array > > > Can anyone help me? I need to produce a random and uniques > array using numbers

[PHP] Unique Array

2001-09-10 Thread Deirdre Mc Cann
Hi Can anyone help me? I need to produce a random and uniques array using numbersbetween 0 and 9. I tried to create a random array and them make it unique. for ($i = 0; $i<100; $i++){ $a[$i] = rand(0,9); $test=$a[$i]; } $ra = array_unique($test); I keep getting an err