title: How to sort CSV table data in PHP by a specific column?
body: <p>Here's the CSV table:</p>
  
  <pre><code>-------------------------
  | Name | Age | Favorite |
  -------------------------
  | John | 30  | Apple    |
  -------------------------
  | Bill | 25  | Grape    |
  -------------------------
  | Ann  | 40  | Orange   |
  -------------------------
  </code></pre>
  
  <p>Now, using strictly PHP, is there anyway to sort only the "Favorite" by ascending order of "Age"? An expected output would be something like this:</p>
  
  <pre><code>25 Grape
  30 Apple
  40 Orange
  </code></pre>
  
  <p>I've been using <code>fgetcsv</code> to echo them onto the document, but they are not not sorted by ascending age, of course. Is there anyway to throw these in an array or something, sort by age, and then echo?</p>