Re[2]: [PHP] Parsing Text File
| From: | Stuart Dallas | Date: | Sat, 15 Jun 2002 20:28:13 +0000 |
| Subject: | Re[2]: [PHP] Parsing Text File | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102360@lists.php.net to get a copy of this message | ||
On Saturday, June 15, 2002 at 9:05:40 PM, Nathan Taylor wrote:
> <?php
> $open = fopen("file.txt","r+");
> while($contents = fgets($open)) {
> $line_array[$x] = $contents;
> $x++;
> }
?>>
This wheel exists: http://www.php.net/file
<?php
$line_array = file('file.txt');
?>
--
Stuart