I created this to change the date YYYY-MM-DD to DD-MM-YYYY
the script is working, but the the two "whiles" are casuing that the data is filled in correctly, but for each entry the same text entry is shown. what can I do?
$result = @mysql_query("SELECT ID,titel,url,text,datum FROM news order by datum desc LIMIT 6");
$answers = mysql_query("select DATE_FORMAT(datum, '%c-%m-%Y') as newdate from news ");
while ( $row = mysql_fetch_array($result) ) {
while ($answer = mysql_fetch_array($answers)) {
$id = $row["ID"];
$titel = $row["titel"];
$url = $row["url"];
$text = $row["text"];
$datum = $row["datum"];
$rightformat= $answer["newdate"];
}}