';
foreach ($xml_row AS $key => $value)
{
if (array_key_exists($key, $diff))
{
if (sizeof($table_row))
{
$color_open = '* ';
$color_close = '';
}
else
{
$color_open = '* ';
$color_close = '';
}
}
else
{
$color_open = '';
$color_close = '';
}
if (sizeof($order))
{
$value = (substr($key, 0, 7) == 'team_id') ? $value . ' ' . $this->team_ary[$value] : $value;
$tpl_ary[$order[$key]] = ($order[$key] % 2) ? $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . ' ' :
'' . $color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close . ' ';
}
else
{
if ($key <> 'season' and $key <> 'league')
{
// Write table fields
if (sizeof($table_row))
{
$tpl .= ' | ' .
$color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close .
' | ';
}
else
{
$tpl .= '' .
$color_open . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . $color_close .
' | ';
}
}
}
}
if (sizeof($order))
{
ksort($tpl_ary);
$tpl .= implode(" ", $tpl_ary);
}
if (sizeof($table_row))
{
$tpl .= ' |
';
}
else
{
$tpl .= '