Try:
PHP Code:
<?php
function changeToDifferentDate($old){
$arr_date = explode("-", $old);
return mktime(0, 0, 0, $arr_date[1], $arr_date[2], $arr_date[0]);
}
$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)){
$date = date("d-m-y", changeToDifferentDate($nt['Date']));
echo "<h3>{$nt['Title']}</h3> <p>{$date}</p> <p>{$nt['Content']}</p>";
}
?>
Bookmarks