Saturday, 31 March 2012

Q: How can find out unique number array.


array_unique — Removes duplicate values from an array.
<?php
$input 
= array("a" => "green", "red", "b" => "green", "blue", "red");
$result 
= array_unique($input);
print_r
($result);
?>

No comments:

Post a Comment