title: Ignore Duplicates in Foreach loop
body: <p>I have the following script that loops through form entries on my website.</p>
  
  <p>However, I'd like to remove any duplicate entries (in this case, entries using the same email address). </p>
  
  <p>So if my <code>foreach</code> loop finds a duplicate email address, it breaks the loop.</p>
  
  <p>How do I achieve this using my script below?</p>
  
  <pre><code>foreach ($scouts as $participant) {
              $fname    = ucfirst($participant['2']);
              $lname    = ucfirst($participant['3']);
              $email    = $participant['5'];
              $html .= "\t&lt;li&gt;&lt;a href=&gt;$fname $lname $email&lt;/a&gt;&lt;/li&gt;\n";
      }
  </code></pre>