I am trying to build a Standings page for a hockey pool site that shows Wins, Losses, Ties, etc.
I am struggling with the Tie section. If two teams have the same number of points (PF=PA) the team gets one point. I can get this part to work. However, at the very beginning of the game when it is 0-0, it still shows it as a TIE and awards 1 point for this. I want to put a condition that if both PF=0 and PA=0 that the point awarded should not be 1 but 0.
Here is what I have so far:
if ($row['PF_wk2'] == $row['PA_wk2']) {
$Tie="1";
} else {
if ($row['PF_wk2'] = "0" and $row['PA_wk2'] = "0")
$Tie="0";
}
if ($row['PF_wk2'] != $row['PA_wk2']) {
$Tie="0";
}
echo $Tie;
Any help would be appreciated!