title: How to display a MySQL database record only once when duplicates exist in PHP?
body: <p>Suppose my db looks like this:</p>
  
  <pre><code>id | person_id | hobby       | time
  -----------------------------------
  1  | 67        | golf        | mon
  2  | 33        | reading     | tues
  3  | 67        | baseball    | fri
  4  | 67        | golf        | sun
  </code></pre>
  
  <p>I want to display a list of all the hobbies of person with id 67 on a page.</p>
  
  <p>If I do this:</p>
  
  <pre><code>$query = mysql_query("SELECT * FROM hobbies WHERE person_id = '67'");
  
  while ($row = mysql_fetch_assoc($query)) {
  
     echo $row['hobby'];
  
  }
  </code></pre>
  
  <p>I wil get:</p>
  
  <pre><code>golf
  baseball
  golf
  </code></pre>
  
  <p>I want duplicate hobbies entered by the same person id to show only once, so it will show:</p>
  
  <pre><code>golf
  baseball
  </code></pre>
  
  <p>And by duplicate I mean however many redundant times the same hobby by the same person is entered in a database (as long as it's more than once it should shown only once).</p>
  
  <p>How can this be done?</p>