I have this code to open and read a text file.
What I need is to take out the 'while' and present the data one line at a time.
I read up on fgetcsv, but we will be using one text file per record.
I just need to format how it is displayed.
Under fgetcvs there was some code to display records $data[0] and 1,2,3,4,etc.
Can someone please point me in the right direction?
<?php if (!($fp = fopen("test.txt", "r"))) exit("Unable to open the input file."); while (!feof($fp)) { $buffer = fgets($fp, 1024); print "$buffer<br>\n"; } fclose($fp); ?>
Thanx in advance.
Later,
Leon
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php