To remove duplicate values from an array using PHP, we have to use the PHP array_unique() function. It removes duplicate values or elements from the array. If our array contains string keys, then this function will keep the first encountered key for every value and will ignore all other subsequent keys.
BY Best Interview Question ON 31 Jul 2019


$var = array("a"=>"best","b"=>"interview","c"=>"question","d"=>"interview");



Array ( [a] => best [b] => interview [c] => question)