john0611
03-02-2009, 03:04 AM
Hi, I really need some help, I have been trying to solve this problem for a while now, and i just can't get it.
I have a simple mysql data base with a few tables on it, including a Date field.
Problem is when I echo the date on my php page its displayed yyyy-mm-dd, and I need it to be displayed dd-mm-yy.
Here is the code I am using to echo the tables and feilds.
<?php
$query="select * from `news flash` ORDER BY Date ASC"; // query string stored in a variable ASC.
$rt=mysql_query($query); // query executed
echo mysql_error(); // if any error is there that will be printed to the screen
while($nt=mysql_fetch_array($rt)){
echo "<h3>$nt[Title]</h3> <p>$nt[Date]</p> <p>$nt[Content]</p>";
}
?>
hope it makes sence!
Thank you for your help and suggestions
JT
I have a simple mysql data base with a few tables on it, including a Date field.
Problem is when I echo the date on my php page its displayed yyyy-mm-dd, and I need it to be displayed dd-mm-yy.
Here is the code I am using to echo the tables and feilds.
<?php
$query="select * from `news flash` ORDER BY Date ASC"; // query string stored in a variable ASC.
$rt=mysql_query($query); // query executed
echo mysql_error(); // if any error is there that will be printed to the screen
while($nt=mysql_fetch_array($rt)){
echo "<h3>$nt[Title]</h3> <p>$nt[Date]</p> <p>$nt[Content]</p>";
}
?>
hope it makes sence!
Thank you for your help and suggestions
JT