Using The Array_Unique () Function

 
    <?php
  $oldarray = array ("A", "B", "C", "D", "E", "F");
  $newarray = array_unique ($oldarray);
 
  foreach ($newarray as $val) {
     echo "$val", "\n";
  }
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.