Re: more results (loop)

From: Date: Fri, 11 Apr 2003 15:41:41 +0000
Subject: Re: more results (loop)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143524@lists.php.net to get a copy of this message
check the name of the results variable. the two are different... Jim ----- Original Message ----- From: "Sebastian" <sebastian@dslr.net> To: "php list" <php-general@lists.php.net> Sent: Friday, April 11, 2003 7:10 PM Subject: [PHP] more results (loop) > 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 > > >

« previous php.general (#143524) next »