I've tried using the codes from this site: https://www.ibm.com/developerworks/library/x-buildpdfphp/ to test. However, there are syntax errors found on a php page. Here's the code: I've placed the 'Syntax Error' to where the errors were located.
<html><head><title>Event Results</title></head>
<body>
<?php
include_once ('XML.php');
$results = getResults();
foreach( $results as $event ) {
?>
<h1><?php echo( $event['name']) ?></h1>
<table><tbody>
<?php
foreach( $event['games'] as $game ) {
$s1 = (int) $game['score1']; <-- Syntax Error Here -->
$s2 = (int) $game['score2']; <-- Syntax Error Here -->
?>
<tr>
<td style="font-weight:<?php echo( ( $s1 > $s2 ) ? 'bold' : 'normal') ?>">
<?php echo( $game['team1'] ) ?></td>
<td><?php echo( $s1 ) ?></td>
<td style="font-weight:<?php echo( ( $s2 > $s1 ) ? 'bold' : 'normal') ?>">
<?php echo( $game['team2'] ) ?></td>
<td><?php echo( $s2 ) ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
?>
</body></html>