<div class="mod_bg border-all dropshadow"> <?php include 'layouts/banner.htm'; include 'layouts/score-nav.php'; ?> <div class="row"> <div class="col-md-12"> <div class="results_wrapper clearfix"> <?php if (isset($scores)) { displayScores($scores); } /* * Build all of the score cards * @param $scores the array of scores */ function displayScores($scores) { $j = 0; foreach ($scores as $result) { // if away or home team does NOT equal TBA, display it if ($result['away_team'] !== 'TBA' && $result['home_team'] !== 'TBA') { // lets do even odd $j++; // if it's on left add class left, on the right add class right $j % 2 == 1 ? $clear = 'left' : ($clear = 'right'); // winner class vars set to empty by default $home_win = ''; $away_win = ''; // check if the final score is filled out and assign values to vars
<?php require_once 'play.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php echo displayScores(); ?> </body> </html>