title: skip duplicate entry in foreach mysql
body: <p>hi friends i need to <strong>skip</strong> a <strong>duplicate</strong> entries in <strong>foreach</strong> and than <strong>continue</strong> on remaining ones please tell me how can i do this</p>
  
  <pre><code>foreach($arr as $key=&gt;$arr1)
  {
      echo "&lt;pre&gt;";
  
  $insert=mysql_query("INSERT INTO auth_user(id,username,first_name,last_name,email,password,is_active,date_joined) VALUES('".$key."','".$arr1['username']."','".$arr1['firstname']."','".$arr1['lastname']."','".$arr1['email']."','NULL','".$arr1['is_active']."','".$arr1['date_joined']."')",$conn1);
  
  echo $insert .'&lt;br/&gt;';
  if($insert)
      {
          echo "DATA MIGRATE FOR USER ".$key;
          $insert1=mysql_query("INSERT INTO stylequiz_score(user_id,style_quiz_score,style_quiz_answer) VALUES('".$key."','".$arr1['style_quiz_score']."','".$arr1['style_quiz_answer']."')",$conn1);
      }
      else
      {
         echo  ("Error In MIGRATION FOR USER ".$key . mysql_error());
  
      }
  }
  </code></pre>