">

NFL Team Statistics for

$league $year $teamname Record (W-L-T): $wins-$losses-$ties
"; //
//
Offence - Points: $offpt Yards: $offyd
//
Defence - Points: $defpt Yards: $defyd
//
echo "
Passing Leader: $passfirstname $passlastname
Receiving Leader: $receivefirstname $receivelastname
Rushing Leader: $rushfirstname $rushlastname
Head Coach: $coach
"; } ?>

National Football League (NFL) Team Statistics and Histories

"; // Active Teams Section $count = 0; $query = "select * from zz_teams where defunct !='yes' order by teamname asc"; $query2 = mysql_query($query); $results = mysql_num_rows($query2); echo "

Currently $results Active NFL Teams

"; $columns = 4; // How many columns to display on the webpage $howmanyrows = ($results / $columns); // How many rows are there when dividing against columns required in the page. $rowsrounddown = floor($howmanyrows); // Round the number of rows down. This is a holding number to determine if the columns required divide into rows evenly $isnumberround = ($howmanyrows - $rowsrounddown); // Determine if number of rows divides evenly into the rounded down number. This is the funky magic. If number isn't zero then we need to close a div while ($query3 = mysql_fetch_array($query2)) { $count++; $rowcount++; $team = $query3['team']; $teamname = $query3['teamname']; if ($count == "1") { echo "
"; } echo ""; if ($count == "$columns") { echo "
"; $count = 0; } } if ($isnumberround != "0") { echo "
"; } // If rounded down number divided into the rows (divided by columns) isn't zero then there is an orphin div from the loop that needs to be closed // End Active Teams Section echo "
"; // Defunct Teams Section $count = 0; $query = "select * from zz_teams where defunct = 'yes' order by teamname asc"; $query2 = mysql_query($query); $results = mysql_num_rows($query2); echo "

Currently Listing $results Defunct NFL Teams

"; $columns = 2; // How many columns to display on the webpage $howmanyrows = ($results / $columns); // How many rows are there when dividing against columns required in the page. $rowsrounddown = floor($howmanyrows); // Round the number of rows down. This is a holding number to determine if the columns required divide into rows evenly $isnumberround = ($howmanyrows - $rowsrounddown); // Determine if number of rows divides evenly into the rounded down number. This is the funky magic. If number isn't zero then we need to close a div while ($query3 = mysql_fetch_array($query2)) { $team = $query3['team']; $teamname = $query3['teamname']; $defunct = $query3['defunct']; $years = $query3['years']; if ($count == "1") { echo "
"; } echo ""; if ($count == "$columns") { echo "
"; $count = 0; } } if ($isnumberround != "0") { echo "
"; } // If rounded down number divided into the rows (divided by columns) isn't zero then there is an orphin div from the loop that needs to be closed // End Defunct Teams Section echo "
"; ?>