| Previous | Home | Next |
array_unique()
The array_unique() function removes duplicate values from an array. If two or more array values are the same, the first appearance will be kept and the other will be removed.
Syntax:array_unique(array)
In above syntax, "array" specifying an array.
Example:
<?php
$a=array("a"=>"Apple","b"=>"Mango","c"=>"Apple");
print_r(array_unique($a));
?>
Output:
| Previous | Home | Next |