Greetings learned PHP(eople),
There have been a number of postings recently on opening and reading
files, and whilst I have read `em all I fail to make sense of it all.
Basicaly...I have a text file with entries in it...I wish to display the
contents of this file line by line in an HTML table :
At present all I get is a table with 1 row and all the text in it in a
large messy blob.....
=====================================================================
<html>
<body>
<?php
$handle = fopen("fopen.txt","r");
echo '<table border="1"'."\n";
echo ' <tr>'."\n";
echo ' <td width="15%"><b>File Entries</b></td>'."\n";
echo ' </tr>'."\n"."\n";
//----------------------------------------
//For each line in the file--------
// while (fpassthru($handle));
//{
//Print them out to Table-----------------
echo ' <tr>'."\n";
echo ' <td width="15%"><font size="2">';
echo fpassthru($handle);
echo '</td></tr>'. "\n";
//}
echo '</table>';
//fclose($handle);
?>
</body>
</html>
=================================================
I have commented out those lines which fail and am stuck as to what the
correct syntax should be. I have read up on nl2br,fgets and other posts
on php.net, but ......harumphhhhhhhh....
Thanks
--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
It is reported that somewhere in the world, every 15 seconds, a woman
gives birth to a child. She must be found and stopped.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php