Indenting is using tabs to properly structure your code for readability. Have a look at code formatting
Among other things, stay consistent
/* usually you keep the opening bracket on the same line.
but here you have it on both the opening line and the next one... */
else {
{
$standing_text .= '<tr '.($standing['in_contention'] == 1 ? 'class="contendor"' : null).'>';
$standing_text .= '<td>'.$rank.'</td>';
// except sometimes it's on the next one.
foreach(array('rank_delta', 'driver', 'points', 'behind', 'starts', 'poles', 'wins', 'top5', 'top10', 'dnf', 'winnings') as $stat)
{
$standing_text .= '<td>'.$standing[$stat].'</td>';
}
$standing_text .= '</tr>';
// If you code was properly indented, having two closing brackets in the same column position would be an indication that something isn't right.
}
}
?>
And there are lots of errors in the code. Turn on error reporting. Wether you echo to screen or just log them to file doesn't matter, as long as you get to see them one way or other.
You lack ; to end statements. You have an unmatched number of { and } which means you have ?> where php will expect }.