Hello, I'd really need some help.
My english may be a little bad so sorry for this :rolleyes:
I'm new to php and trying to learn correctly, but I havn't been able to find how to do it.
Here is what I'm trying to do:
in a text file there are links separated like this
<div class="links>link 1</div>#enddiv
<div class="links>link 2</div>#enddiv
<div class="links>link 3</div>#enddiv
...
<div class="links>link 150</div>#enddiv
now, lets say I have 3 html pages to separate those links.
On page 1, I want to have links 1 to 50
On page 2, links 51 to 100
On page 3, links 101 to the rest (I'm keeping last page for all the rest of links so maybe there are less or more)
for now on, I'm stuck with the following code and don't know what to continue with (probly strtok but doesn't know how to do it.)
<?php
$links = "links.txt";
$fd = fopen ($links, "r");
$content = fread ($fd,filesize ($,links));
fclose ($fd);
$delimiter = "#enddiv";
?>
Thanks in advance for the help, I'm really confused, php is a new world for me