I'm trying to display a date from some data in a MySQL database. There are variables for day, month and year. At the moment, I've sort of done it manually. I tried using mktime, but got rather random results.
here's what I've got at the moment:
<?php
#month code
$monthname = array( 1 => "January", 2 => "February", 3 => "March", 4 =>
"April", 5 => "May", 6 => "June", 7 => "July", 8 =>
"August", 9 => "September", 10 => "October", 11 => "November", 12 => "December");
echo $monthname[$row_event['month']]
?>
<?php echo $row_event['day']; ?>, <?php echo $row_event['year']; ?>
can anyone tell me how to use a proper date function to siplay the data so I can format it more nicely?
PS the above code is a mixture of Dreamweaver MX generated and my dodgy coding!