Answer the question
In order to leave comments, you need to log in
How to convert file data to array in PHP?
There is a text file with the following content:
Имя * значение
Имя * значение
...
[0] => Имя * значение,
[1] => Имя * значение,
...
'Имя' => 'Значение',
'Имя' => 'Значение',
...
Answer the question
In order to leave comments, you need to log in
fgetcsv with ' * ' delimiter Looping through rows
For
each row you get an array with two elements
And you use the first element as a key, the second as a value for a new array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question