Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How make call to next array to show on dynamically created pages ?

Status
Not open for further replies.

MrBean

Technical User
Mar 1, 2001
2
SE
I have a textfile (no db) that recieves entrys from a form. Code to grab text & split a new entry into arrays looks like this:
////////////////////////////////////////////////////////
$file = "data/poems.txt";
$fileopen = @fopen($file, "r")
OR DIE ("Sorry, can't open poemsfile right now");
for ($i=0; $buffer = fgets($fileopen, filesize($file)); $i++) {
$file_array[$i] = $buffer;
}
/* $file_array[0] = line 1, $file_array[1] = line 2 etc.. */
fclose($fileopen);
////////////////////////////////////////////////////////
Then to get the first entry to show in a table cell

echo $file_array[0];

Problem is, that that the new page is made on the fly, & i dont know how to make the call to next array
which is $file_array[1]to make it jump in to the next page & take the place of the previous one.
Any suggestions on how ?

Thanks in advance !
 
Sorry for my poor english. I meant that each new entry is made in to a new array.
1:st entry = array[0] 2:nd entry = array[1] e.t.c
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top