I have a .txt (csv) file which I want to read thru PHP and arrange it in arrays so that I can later insert
or update
it into MySQL, The text
file is like this:
FIELD1;FIELD2;FIELD3;FIELD4
CATEGORY 1(SOME VALUE in PARENTHESIS)
Sub-Category 1
VALUEof1;VALUEof2;VALUEof3;VALUEof4
VALUEof1;VALUEof2;VALUEof3;VALUEof4
VALUEof1;VALUEof2;VALUEof3;VALUEof4
Sub-Category 2
VALUEof1;VALUEof2;VALUEof3;VALUEof4
VALUEof1;VALUEof2;VALUEof3;VALUEof4
VALUEof1;VALUEof2;VALUEof3;VALUEof4
CATEGORY 2(SOME VALUE in PARENTHESIS)
Sub-Category 1
VALUEof1;VALUEof2;VALUEof3;VALUEof4
VALUEof1;VALUEof2;VALUEof3;VALUEof4
VALUEof1;VALUEof2;VALUEof3;VALUEof4
I have been able to read each line separately beyond that I have gone completely blank and not able to figure out what is to be done, any advice or direction will be appreciated