note 55710 deleted from function.fgets by nlopess
| From: | nlopess@php.net | Date: | Thu, 11 Aug 2005 11:44:19 +0000 |
| Subject: | note 55710 deleted from function.fgets by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93430@lists.php.net to get a copy of this message | ||
Note Submitter: Jeff
----
Just wanted to point out that you can do a priming read on the data file outside a while statement
to get your data to act on;
<?php
$handle = fopen("some_file", "r");
$buffer = fgets($handle, 4096);
while (!feof($handle)) {
echo $buffer;
}
?>
Then when you enter the while loop (if you do) you have data already waiting for you to act on.