ok i have this file, its for a guestbook, and i want to display the most recent entries first. (i dont know mysql so thats sorta out of the question) so i have this code to read the file backwards, but then it messes up the table codes in the file. so how can i print the file backwards, but not line-for-line backwards, just each entry?
BTW heres the code i was using:
<?
$file="files/guestbook_messages.dat";
$read=file($file,'r');
$read=array_reverse($read);
for($i=0; $i<=count($read);$i++){
$result=$read[$i];
print $result;
}
?>