Bit of a date issue
I have a date in my database but it is storeded as a string Varchar10 gets inserted fine and everthing through the datepicker field but now I want to display date form string in the m d Y format instaed of how it comes from the database 2012-04-10.
So I have a formula I've tried:
$timestamp = $row_rsclasslist['start_date'];
$timestamp = strtotime($timestamp);
$makedate = date("d, m, Y",$timestamp);
and I have a query with a repeat region to display:
<?php do { ?>
<table width="100%" border="0">
<tr>
<td width="35%"><a href="ClassDetail.php?event_id=<?php echo $row_rsclasslist['class_id']; ?>"><?php echo $row_rsclasslist['class_title']; ?></a></td>
<td width="65%"><?php echo $row_rsclasslist['start_date']; ?> <?php echo $makedate; ?></td>
</tr>
</table>
<?php } while ($row_rsclasslist = mysql_fetch_assoc($rsclasslist)); ?>
It does display and the $makedate works for the first record in the repeat region it just repeats the same date as the first record like so:
Tribal Belly Dancing
2012-04-10 10, 04, 2012
Learn to Love Watercolor and Pastels
2012-04-11 10, 04, 2012
The Blue Shutters- Watercolor
2012-04-21 10, 04, 2012
Reinventing from the Wheel
2012-04-21 10, 04, 2012
Painted Floor Clothes
2012-04-23 10, 04, 2012
Introduction to Pastels
2012-04-27 10, 04, 2012
Correct date is one on left
So what am I missing? Why is'nt this repeating?
Tracy