3
I’m picking up a PHP file.
$arquivo = file_get_contents($_FILES['arquivo']['tmp_name']);
I want to know how I do to get this file and put it in a array for every line break he finds \n.
for example:
Nome 1
Nome 2
Nome 3
Nome 4
I’ll get these 4 names in a file .txt and put them in a array. The goal is to put all the information into one vector and write it.
How do I write the variables?
– Felipe Jorge
With
print_r
or use aforeach
to iterate the results. You can also reference row by row using the array$nomes[0]
– gmsantos