title: Fetch list of filename from mysql and add in indexed array in php
body: <p>I have a table named as 'files' with fields id, formID ,filename, date_modified.</p>
  
  <p>Now i want to fetch list of filenames from this table to an array with index of array from each row with same formID in that array for example:</p>
  
  <p>(In core php)</p>
  
  <p><strong>Instead of this</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [file_name] =&gt; filename1.jpg
          )
      [1] =&gt; Array
          (
              [file_name] =&gt; filename2.jpg
          )
  )
  </code></pre>
  
  <p><strong>I want result in this format:</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; filename1.jpg
      [1] =&gt; filename2.jpg
  )
  </code></pre>