I am aware that this:
<?php
$file2 = file('website/files/myfolder/file.html');
echo $file2[8];
echo $file2[9];
echo $file2[10];
echo $file2[11];
?>
would give me the contents on lines 8,9,10,11 in the file.html file, however I would like to do this for about 100 lines ranging from lines 23 to 116. How would I accomplish this without using the echo $file2[NUMBER]; one hundrend times?
Another way to explain what I am trying to do would be possibly if I could do this in php:
echo $file2[23-116];
obviously this will not work but that is the concept.
Thanks for your help!
Use a loop like so
Or you could splice the data: