title: Format date from database to table using php
body: <p>I have a database full of football fixtures, sorted in descending order. Everything works fine however the dates are in the following format: YYYYMMDD like so - 2014-05-11. </p>
  
  <p>All table contents are selected with:</p>
  
  <pre><code> $result = mysqli_query($con,"SELECT * FROM Fixtures ORDER BY Date DESC");
  </code></pre>
  
  <p>Then inserted into the table with the below code:</p>
  
  <pre><code>while($row = mysqli_fetch_array($result))
    {
  
    echo "&lt;tr&gt;";
    echo "&lt;td&gt;" . $row['Date'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['Home Team'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['Score'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['Away Team'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['Score1'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['Competition'] . "&lt;/td&gt;";
    echo "&lt;/tr&gt;";
    }
  echo "&lt;/table&gt;";
  </code></pre>
  
  <p>How can I make it so these dates appear DDMMYYYY such as 11-05-2014? </p>
  
  <p>Thanks!</p>