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 !
////////////////////////////////////////////////////////
$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 !