contents from a database

From: Date: Tue, 16 Jul 2002 22:34:03 +0000
Subject: contents from a database
Groups: php.general 
Request: Send a blank email to php-general+get-107976@lists.php.net to get a copy of this message
I have a script that can desplay all the contents from a database but I need the result to equil a variable, but when I do this it only desplays one line from the database. I used to know this but I lost the info that I was given. this is the script I am using.. $query = "SELECT * FROM content WHERE section='$section' "; $result = mysql_query($query); while($res = mysql_fetch_array($result)) { $sub="<a href='index2.html?section=".$res[section]."&code=".$res[code]."'>".$res[art_ name]."</a><br> "; } I know there is something I can add after $sub. Please can you tell me what it is? thanks heaps, Dan

« previous php.general (#107976) next »