Removes duplicate values from an array
by sabitha[ Edit ] 2012-06-05 14:20:33
Removes duplicate values from an array
array_unique - This function removes duplicate values from an array
$myarr = array("apple", "orange", "banana", "orange");
$res = array_unique($myarr);
print_r($res);
will outputs
Array
(
[a] => apple
[0] => orange
[1] => banana
)