Select($sql); if ( $db->_rowCount > 0 ) { $smarty->assign("foodCount", $db->_rowCount); $smarty->assign("userFoods", $db->_rows); } # grab the various parts. these sections are not printed to the screen # but rather dumped into smarty variables that will simply be printed # in the template, so the order doesn't matter here at the moment require("header.php"); require("sidebar_left.php"); require("sidebar_right.php"); require("footer.php"); $smarty->display("list_foods.tpl"); ?>