Tim In your select statment you have labeled the returned column as date yet your mysql_fetch_array uses the label 'tutdate' - the labels don't match...
To fix it, either do this... $query = "SELECT DATE_FORMAT(tutdate, '%b-%e %l%p') as tutdate FROM tutorial_table"; or do this ... $vardate = stripslashes($row['date']); HTH Rich -----Original Message----- From: Tim Blackwell [mailto:[EMAIL PROTECTED]] Sent: 04 October 2002 14:12 To: [EMAIL PROTECTED] Subject: [PHP-WIN] dates any reason why my echo statement doesn't work in this script? <? mysql_select_db("tutorial"); $query = "SELECT DATE_FORMAT(tutdate, '%b-%e %l%p') as date FROM tutorial_table"; $result = mysql_query($query); $num_results = mysql_num_rows($result); for ($i=0; $i <$num_results; $i++) { $row = mysql_fetch_array($result); $vardate = stripslashes($row["tutdate"]); echo "$vardate"; } ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php