Q:

Date formatting not clear

Below code format for date is: 2017-12-02
But how to replace this to be 02-12-2017. Tried various solutions, but none is working so far.
<?php
if($result1->num_rows > 0){
  while($row = $result1->fetch_assoc()){?>
 <tr>
  <td><?php echo $row['Date']; ?></td>
  <td><?php echo $row['Time']; ?></td>
  <td><?php echo $row['Home']; ?> - <?php echo $row['Away']; ?></td>
</tr>

A:

$newDate = date("d-m-Y", strtotime($row['Date']));
echo $newDate;

Try this one or whichever field your date is stored. It will convert it to the format you need.
Comment answer:
for your case you can echo the value like this :
<?php echo date("d-m-Y", strtotime($row['Date'])); ?>

You can simple replace the old value you were echoing and wanted to remove. 

