title: How to find unique values in array
body: <p>Here i want to find  <code>unique</code> values,so i am writing code like this but i can't get answer,for me don't want to array format.i want only string</p>
  
  <pre><code>&lt;?php
  $array = array("kani","yuvi","raja","kani","mahi","yuvi") ;
  $unique_array = array(); // unique array
  $duplicate_array = array(); // duplicate array
  foreach ($array as $key=&gt;$value){
    if(!in_array($value,$unique_array)){
         $unique_array[$key] = $value;
    }else{
       $duplicate_array[$key] = $value;
    }
    }
    echo "unique values are:-&lt;br/&gt;";
    echo "&lt;pre/&gt;";print_r($unique_array);
  
    echo "duplicate values are:-&lt;br/&gt;";
    echo "&lt;pre/&gt;";print_r($duplicate_array);
  
  ?&gt;
  </code></pre>