G'day y'all!
Quick question, how do i determine if a variable is the last in a while statement? Say the following is my while statement, i don't want there to be the "<hr>" after the last entry..
PHP Code:while($row = mysql_fetch_array($query)){
$id = $row['id'];
$from = $row['from'];
$from = username($from);
$message = $row['message'];
$date = $row['date'];
echo("<p><strong>id</strong>: $id<br />
<strong>from</strong>: $from<br />
<strong>message</strong>: $message<br />
<strong>date</strong>: $date<br />
<hr>
");
}
No need to comment on the code apart from how to determine the last variable plz.





Reply With Quote







