I have a script that reads a text file and prints to information in a nice format, the problem i have now, is the file has gotten really big, and i need to display only ten results on a page, how would be the best way to go about this?
I'm using a FOR loop to get the information out of a VER @results, and in this @ VAR it contains multiple entries each entry is five lines...
Header
Title
Name
Date
Content
this is what i have so far...
I was thinking i could do something with $i and pass a VAR in the URL, but i'm not sure if that would work.
I'm using a FOR loop to get the information out of a VER @results, and in this @ VAR it contains multiple entries each entry is five lines...
Header
Title
Name
Date
Content
this is what i have so far...
Code:
my @forum_list = file contents
for ($i = 0; $i <= $#forum_list; $i++){
if ($forum_list[$i] =~ /0IHEADERI0/){
#### where 0IHEADERI0 is the header of the input
# $forum_list[$i + 1] = title
# $forum_list[$i + 2] = Name
# $forum_list[$i + 3] = Date
# $forum_list[$i + 4] = Content
print <<END;
## Prints the formated HTML
END
}
}
I was thinking i could do something with $i and pass a VAR in the URL, but i'm not sure if that would work.