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?