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
Try this,the simplest one
$buffer=explode("\n",file_get_contents("filename"));//Split data to array for each "\n"
Now the buffer is an array and each array index contain each lines; To get the 5th line
echo $buffer[4];