Got dates stored in a MySQL database in the format: 2009-05-02 00:00:00
Pulling these out into a table using a mysql_fetch_array and would like them to display as "2nd May" instead of 2009-05-02 00:00:00. Easiest way to go about doing it? I have tried finding results on Google, so please don't suggest that
Pulling these out into a table using a mysql_fetch_array and would like them to display as "2nd May" instead of 2009-05-02 00:00:00. Easiest way to go about doing it? I have tried finding results on Google, so please don't suggest that
PHP:
<?php //create sql query for the calendar
$query = 'SELECT meet_date, meet_name, cir_name, meet_table, meet_entries FROM meeting, circuit WHERE meeting.meet_cir = circuit.cir_id ORDER BY meet_date ASC;';
$result = mysql_query($query);
?>
<div class="leftcontent">
<h2>2009 Calendar</h2>
<p>
<table>
<tr> <th>Date</th> <th>Meeting</th> <th>Circuit</th> <th>Timetable</th> <th>Entry List</th> </tr>
<?php while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td>" .$row['meet_date']. "</td>";
echo "<td>" .$row['meet_name']. "</td>";
echo "<td>" .$row['cir_name']. "</td>";
echo "<td>" .$row['meet_table']. "</td>";
echo "<td>" .$row['meet_entries']. "</td>";
echo "</tr>";
}
?>
</table>