I am working on reading a file in php. I need to read specific lines of the file.
I used this code:
fseek($file_handle,$start); while (!feof($file_ha
Does this work for you?
$file = "name-of-my-file.txt"; $lines = file( $file ); echo $lines[67]; // echos line 68 (lines numbers start at 0 (replace 68 with whatever))
You would obviously need to check the lines exists before printing though. Any good?