...

View Full Version : When Users Upload *.txt file, i will get Total Points ,Points Per Game ,etc...



serhat_kk
06-15-2006, 05:45 PM
Hi;
I have a online nba live (basketball game) site, i want to add following option.

When user upload *.txt file to my site (you will see at the picture)
http://img128.imageshack.us/my.php?image=nbalivetxt9gx.jpg


i Want to get average and total stats.

For Example;
Total Points ,Points Per Game ,etc...


How do i make it?

Thanks for your help...

dswimboy
07-11-2006, 06:20 AM
are you familiar with php at all? are you using a database like mySQL?

the php manual will be a big help http://us3.php.net/manual/en/index.php

specifically i'd look at the preg_split() (http://us3.php.net/manual/en/function.preg-split.php) function to divide up your data into an array.

then i'd use the array_sum() function to find the sum, and array_sum()/count() to find averages.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum