I have a page that displays sports scores from a text file. It iterates through the file and each line displays thusly:
home team - score --- visiting team - score
there are multiple teams with the same name, but they are grouped by divisions: Varsity, JV, MS, etc.
What I'm trying to get my head around is to collect the same team names, and increment a counter for each team when they win, and another when they lose, and create an array of standings, like so:
$standing[$division][$teamname]['win']
and
$standing[$division][$teamname]['loss']
am I on the wrong track here, or is this promising?
My major difficulty (I think) is how to load the $hometeam and $visitingteam names into the array...