You need to use the concatenating assignment operator .= after $sub. The
way you had it the variable $sub was getting assigned a new value each time
through the while loop. The .= oprerator will add to the existing value of
$sub each time through the loop.
Try this:
$query = "SELECT * FROM content WHERE section='$section' ";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
$sub .= "<a href='index2.html?section=" . $res[section] .
"&code=" . $res[code] . "'>" . $res[art_name] . "</a><br>\n";
}
Good luck :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php