Results 1 to 5 of 5
Thread: Reading a CSV from TXT file
Apr 2, 2013, 17:37 #1
- Join Date
- Sep 2002
- Katy, TX
- 0 Post(s)
- 0 Thread(s)
Reading a CSV from TXT file
I've got a text file with contents such as this:
A, B, C
D, E, F
G, H, I
I'm trying to figure out a way to read each line into a set of three variables that I can then manipulate.
I found something like this:
$splitcontents = explode($delimiter, $contents);
But this is reading the file like so: A,B,C,D,E,F,G,H,I
When I need to be able to read it as individual rows of three variables.
As a background - this information is scraped from another website and fed into a txt file that is updated once a day. I did it this way to speed up page loads for my visitors.
Can anyone help?b.varvel