The online racing simulator
Csv + Php
(4 posts, started )
Csv + Php
I've done a bit of googling but can't find the information I'm after.

What it is that my local R/C club's software can export the results in CSV format, my idea was using this to upload the results and store them in a database. Using the database entries a lot of the manual work involved could be cut down.

Is it hard to sort out the information held within the CSV file? Obviously it all needs to be sorted out into, Car Number, Name, Result etc which is where I'm stuck at the moment. Maybe there's a particular technique or tutorial I could read up on if this idea is possible?

Attached is an example of how the software outputs it, as I don't have access to the clubs laptop this is just a race I've thrown together manually. A race may have various amount of drivers, if that makes any difference. Also the lap entry holds every lap the driver does during the race.

Cheers
Keiran


Attached files
example.zip - 285 B - 114 views
The explode() function is very useful for separating data. Just read the file in line-by-line and use explode() on each line.
php can handle this easily. explode will work fine but you should also check this page out http://nz.php.net/fgetcsv

Reading the comments usually brings up some useful functions as well.
Thanks for the info

Csv + Php
(4 posts, started )
FGED GREDG RDFGDR GSFDG