title: SQL select last 10 rows in ascending order
body: <p>here's my current code:</p>
  
  <pre><code>$messages = mysqli_query($link, "SELECT `user`, `message` FROM `chat` ORDER BY `id` DESC LIMIT 10");
  while($row = mysqli_fetch_array($messages)) {
      echo "&lt;strong&gt;".$row['user'].":&lt;/strong&gt; ".safe_out($row['message'])."&lt;br /&gt;";  
  }
  </code></pre>
  
  <p>This prints the last 10 messages from the <code>chat</code> table in descending order. What I'm trying to do is print the last 10 messages in ascending order.</p>
  
  <p>Changing <code>DESC</code> to <code>ASC</code> just prints out the first 10 messages, but I'm trying to get the last 10 messages to print in ascending order.</p>
  
  <p>Do I need to put the mysqli_query results into an array and use <code>reverse</code> or is there an easier way?</p>
  
  <p>Thanks</p>