function list_sections() { $sections = get_all_sections(); $names = array(); while ($row = mysql_fetch_assoc($sections)) { $names[] = $row['crn']; } dom::h3('section-title', 'List Sections:'); dom::push_div('section'); dom::ul($names); dom::pop(); }