more results (loop)
| From: | Sebastian | Date: | Sat, 12 Apr 2003 02:10:58 +0000 |
| Subject: | more results (loop) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-143500@lists.php.net to get a copy of this message | ||
I've seem to have forgotten how to do a loop.
how do i get more results when the echo is not in the while loop?
only getting 1 now...
$result = @mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 3");
while($row = mysql_fetch_row($result2)) {
$title = $row[2];
$text = $row[3];
}
// other queries....
echo "$title <br/> $text";
cheers,
- Sebastian