Can I include only certain lines of a file using PHP? For example, say I want to include only the first line of a document in one portion of my page, but I would like to include everything but the first line in another portion of my page. Is this possible?
$file = file("file_path"); //put the file in an array
echo $file[0]; //print out the first line
$file[0] = ""; $newfile = join("\n", $file); echo $newfile; //make the first line empty //join the array to a string //then print out the new string