Check and Remove Duplicate Values from PHP Array
Thanks for visiting.
Web Technology
PHP, X/HTML, Javascript, CSS, Ajax, SEO and XML
Blog for Web Developers.
Jun 17, 2007
Recent Posting
3 Comments:
hi thank you i get proper array but how i also change the key of my array
ex. $arr=array(0=>2, 1=>2, 2=>4, 3=>4);
$arr=array_unique($arr);
o/p:
array(0=>2, 3=>4);
here i want
array(0=>2, 1=>4);
Try with print_r(array_values(array_unique($arr)));
hi satya prakash
It was nice to read ur code for checking duplicate values in array.
Thanks
rupesh
PHP developer
Gurgaon, India
Post a Comment