Turn php file lines into arrays

#1

I have an assignment to finish until next month.Sounds like this :
I have a php file .txt, with 4 lines(eg of a line:12 34 55 7 45), I need to make a function that returns an array with each center number of each line.

Eg:

12 34 55 6 7 
7 33 44 76 99 
66 98 33 41 11

Returned array will be:

[55, 44, 33]

Thanks you so much, can you help me please, im stuck with this for 7 days.

#2

Do you have a .php file or a .txt file?

What have you tried?

#3

may be acomplished with fgetcsv(), or use file(), foreach() and explode()