Current location: Hot Scripts Forums » General Community » Script Requests » calculate sports team standings


calculate sports team standings

Reply
  #1 (permalink)  
Old 11-17-08, 03:35 PM
hillbillygeek's Avatar
hillbillygeek hillbillygeek is offline
Newbie Coder
 
Join Date: Apr 2007
Location: NW NC Mountains
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
calculate sports team standings

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...
__________________
----
They say that sufficiently advanced incompetence is indistinguishable from malice. Nowhere is this more clear than corporate IT.
Reply With Quote
  #2 (permalink)  
Old 11-20-08, 04:33 AM
j-a-m-i-n's Avatar
j-a-m-i-n j-a-m-i-n is offline
Newbie Coder
 
Join Date: Oct 2006
Posts: 85
Thanks: 0
Thanked 1 Time in 1 Post
Have you considered having all of this information in a database?
It will be much easier to manage the data whilst also manipulating it...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need sports statistic website done tingwc Job Offers & Assistance 0 04-30-06 08:59 PM
Considering Starting a Team (preferrably UK based) Dread Job Offers & Assistance 0 02-11-06 01:19 PM
Development Team wanted! phprocks Job Offers & Assistance 2 06-09-05 09:39 PM
Big PHP project in need of coder(s). Three months timeframe. TDNetwork Job Offers & Assistance 2 03-31-05 06:56 AM
Team Matt_ Job Offers & Assistance 2 07-07-04 03:24 PM


All times are GMT -5. The time now is 09:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.