I am using Codeigniter i have this code within a view, however the format of the date within the database is YYYY-MM-DD i am wanting to changing it to DD-MM-YYYY. I am unable to change it within phpMyAdmin so i am looking for a solution in php.
"Date" is a column within my database just to cause confusion.
$query = $this->db->query('SELECT Date, Home, HomeScore, AwayScore, Away FROM Results');
foreach ($query->result_array() as $row)
{
echo '<div class="col-md-4 col-sm-12"><h3>';
echo $row['Date'];
echo "</h3><h4>Premier League</h4><h5>";
echo $row['Home'];
echo "</h5><span>";
echo $row['HomeScore'];
echo "</span><span>";
echo $row['AwayScore'];
echo "</span><h5>";
echo $row['Away'];
echo "</h5></div>";
}