Remove duplicate elements from array

<?php
$input = array(“a”=>”apple”, “pear”, “b”=>”apple”, “orange”, “avocado”, “banana”);
print_r($input);
$result = array_unique($input);
print_r($result);
?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*