Hmm, can you give example data for which the script does fail?
As I don't seem to understand what it's all about ...
Code:
if ($winnerr[rating] > $loserr[rating])
{
$difference = $winnerr[rating] - $loserr[rating];
}
if ($winnerr[rating] < $loserr[rating])
{
$difference = $loserr[rating] - $winnerr[rating];
}
if ($winnerr[rating] == $loserr[rating])
{
$difference = 0;
}
Why not just
PHP Code:
$difference = abs($winnerr[rating] - $loserr[rating]);