title: check all extensions in DB
body: <p>I have a database with a column named &quot;document_name&quot;. In that column are thousands of rows with document names, like:</p>
  <pre><code>kfhidfs.doc
  kjfdjdf.png
  dsdiusd.exe
  etc.
  etc.
  </code></pre>
  <p>I want to know which extensions my users uploaded in the past.
  So, I select all rows:</p>
  <pre><code>$sql = &quot;SELECT document_name FROM docs&quot;;
  $query = mysql_query($sql);
  while($fetch_doc = mysql_fetch_assoc($query)) {
  </code></pre>
  <p>And I know that I can split the name and the extension using EXPLODE, like:</p>
  <pre><code>// Example 1
  $doc = $fetch_doc['document_name'];
  $piece = explode(&quot;.&quot;, $doc);
  echo $piece[0]; // document name
  echo $piece[1]; // extension
  </code></pre>
  <p>But I only want to see each extension max. 1 time, as I want know which extensions are in the DB, I don't want to know how many.</p>
  <p>But how can I arrange that?</p>