error trying to print last 3 db entries
Posted: Mon Jul 22, 2002 2:08 pm
here is my code:
I now the formatting is wrong on that echo and it's real ugly, just wondering if anyone had a better way to format that line, here's the error i get:
Code: Select all
<?php require_once('Connections/ydntNews.php'); ?>
<?php
mysql_select_db($database_ydntNews, $ydntNews);
$query_news = "SELECT * FROM news ORDER BY id DESC";
$news = mysql_query($query_news, $ydntNews) or die(mysql_error());
$row_news = mysql_fetch_assoc($news);
$totalRows_news = mysql_num_rows($news);
?>
<?php
$i = 0;
do {
echo("messagesї$i-1]='<font face=verdana color=#ffffff size=1>$row_newsї'headline']</b><br> :<a href=http://www.yiinc.com/news.php?id=$row_newsї'id']><font color=#cccccc>Full Story</a></font>");
$i++;
}
while ( $i < 3 );
?>Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/ttoomey/ydnt.com/messageTest.php on line 13