print <<<EOD <h1>{$EVENT_CODE_TITLE}</h1> <table border="1" cellpadding="2" cellspacing="2"> <thead> <th>Order</th> <th>Id</th> <th>Name</th> <th>Score 1</th> <th>Score 2</th> <th>Score 3</th> <th>Score 4</th> <th>Score 5</th> <th>Score 6</th> <th>Time</th> <th>Deduction</th> <th>Time Deduction</th> <th>Final Score</th> <th>Placement</th> </thead> <tbody> EOD; foreach ($scoringRs as $row) { $id = makeCmatId($row['id']); $name = $row['name']; print '<tr><td> </td><td>' . makeCmatId($row['id']) . '</td><td>' . $name . '</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>'; } print <<<EOD </tbody> </table> EOD ;
$competitorName = array(); foreach ($competitorRs as $row) { $cmatId = makeCmatId($row['competitor_id']); $competitorIds[] = $cmatId; $competitorName[$cmatId] = makeName($row['first_name'], $row['last_name']); } $events = array(); foreach ($individualRs as $row) { $cmatId = makeCmatId($row['competitor_id']); if (!isset($events[$cmatId])) { $events[$cmatId] = array(); } $events[$cmatId][] = "{$row['code']}: {$row['form_name']}"; } foreach ($groupRs as $row) { $cmatId = makeCmatId($row['competitor_id']); if (!isset($events[$cmatId])) { $events[$cmatId] = array(); } $events[$cmatId][] = "Group: {$row['group_name']}"; } print <<<EOD <table> <thead> <th>1_Id</th> <th>1_Name</th> <th>1_Event1</th> <th>1_Event2</th> <th>1_Event3</th> <th>1_Event4</th> <th>1_Event5</th>