I have a text file and I want each row to be an element of an array.
$ file = file ("books.txt"); $ Partition = explosion ("\ n", $ file); Then if I try to print an element of the array:
"$ split [0]" echo; I do not get any output.
Because file ("Books.txt") already new line As a result of the explosion gives an array, you echo "$ file [0]"; , no need for further exploding.
No comments:
Post a Comment