I have txt file which looks like
Stefan;Mihajlovic;2;3, 2, 3, 2, 3, 2;100
Milutin;Milankovic;1;2, 3, 4, 5, 6, 89;1000
I managed to split it by new line using code below
$array = file('test.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
var_dump($array);
Output is this:
array(2) {
[0]=> string(82) "Stefan;Mihajlovic;2;3, 2, 3, 2, 3, 2;100"
[1]=> string(82) "Milutin;Milankovic;1;2, 3, 4, 5, 6, 89;1000"
}
What I need now is to split every array by ";" and fetch all as a row. Honestly, I started learning PHP a few days ago so I have no idea how to do it. Any help is appreciated
UPDATE Sorry i forgot to mention that i need to do it dynamically since new lines will be added every day.