How do you read ceratin lines of a text file with php?
Printable View
How do you read ceratin lines of a text file with php?
If you want a certain line, the best way (IMO) is:
Code:$fileContents = file('filename.txt');
echo $fileContents[1]; // will echo the second line
its that simple? wow i've been loading the whole file into a string then loopin through splitting it up but it was just getting confusing :)
thanks i'll give it a hot tonight :)