title: How to get a list of categories from database with php?
body: <p>I have a column in my database called 'category' that contains the name of the individual category that each blog post is in ('cars','books','movies').</p>
  
  <p>I need to create a list that contains each of these categories.</p>
  
  <p>When I query the database and echo all my categories I get a list with many duplicates (as expected).</p>
  
  <p>Example:</p>
  
  <ul>
  <li>books</li>
  <li>books</li>
  <li>books</li>
  <li>cars</li>
  <li>movies</li>
  <li>movies</li>
  </ul>
  
  <p>But what if I just want to display each individual category. How is this done? Can somebody point me to an online resource for this.</p>
  
  <p>example:</p>
  
  <ul>
  <li>books</li>
  <li>cars</li>
  <li>movies</li>
  </ul>