I\'ve been working on something for the past few days but this one bit of code perpetually throws an unexpected T_ECHO. My friends can\'t seem to find anything wrong with it an
Try this...
I think it may have been falling over because once you've parsed the categories resultset, for the first site, it comes up with nothing the next time you call mysql_fetch_array. So, doing this upfront and popping the results into a variable fixes that.
I've added "\t" and "\n" to the strings to make the html format prettily in view source.
$result = mysql_query("select * from tmp_sites");
$categories = mysql_query("select * from tmp_cats");
$select_options = "";
while ($roar = mysql_fetch_array($categories, MYSQL_ASSOC)):
$select_options .= "\t\t\n";
endwhile;
echo "";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)):
echo "\t\n";
echo "\t\t". $row["site_description"] ." \n";
echo "\t\t". $row["url"] ." \n";
echo "\t\t \n";
echo "\t \n";
endwhile;
echo "
"