ketanco
12 Jul 2008, 03:14 PM
Hi,
I would like to modify the date display format, for the dates stored in my database.
It is stored like this: 2008-07-01
I want to print as: July, 1st
Now I wrote something as below, but it displays Dec 31st instead of July 1st. (And in my database Dec31 is nowhere anyway). Please tell me how to fix.
Here is the relevant part of code:
while ($row = mysql_fetch_array($query)) {
$c1=$row['date'];
$c=date('F jS',$c1);
echo"<p class='title1'>" . $c."<br/>". $row['title'] . "</p>" ; }
Thanks
I would like to modify the date display format, for the dates stored in my database.
It is stored like this: 2008-07-01
I want to print as: July, 1st
Now I wrote something as below, but it displays Dec 31st instead of July 1st. (And in my database Dec31 is nowhere anyway). Please tell me how to fix.
Here is the relevant part of code:
while ($row = mysql_fetch_array($query)) {
$c1=$row['date'];
$c=date('F jS',$c1);
echo"<p class='title1'>" . $c."<br/>". $row['title'] . "</p>" ; }
Thanks