Here's what I got-
$awards_sql_1 = mysql_query('SELECT * FROM categories WHERE section_id = 1') or die(mysql_error());
$awards_rows_1 = mysql_num_rows($awards_sql_1);
$awards_sql_2 = mysql_query('SELECT * FROM categories WHERE section_id = 2') or die(mysql_error());
$awards_sql_3 = mysql_query('SELECT * FROM categories WHERE section_id = 3') or die(mysql_error());
$awards_sql_4 = mysql_query('SELECT * FROM categories WHERE section_id = 4') or die(mysql_error());
$i = 0;
$records = mysql_num_rows($sections_query);
while($row_sections = mysql_fetch_array($sections_query)) {
echo "<h3>" . $row_sections['section_name'] . "</h3>";
echo "<ul>";
//while($categories = mysql_fetch_array($awards_sql_1)) {
for ($i = 0; $i < $awards_rows_1; $i++) {
echo "<li><strong>$categories['category_name']</strong>";
}
echo "</ul>";
}
For some reason, if I comment out the for() nested in the while(), the page will load fine and I'll see all of my h3's, however, whenever I try to nest a for() or while() inside the original while(), the page just goes blank on reload.
What am I doing wrong?