How can I remove duplicate values from an array in PHP?
$array = array("a" => "moon", "star", "b" => "moon", "star", "sky"); // Deleting the duplicate items $result = array_unique($array); print_r($result);
ref : Demo