note 35367 added to function.fopen
| From: | dougSPAMLESS at NOSPAMbadblue dot com | Date: | Thu, 28 Aug 2003 19:04:35 +0000 |
| Subject: | note 35367 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55256@lists.php.net to get a copy of this message | ||
check this function out, which i discovered by accident:
$aTemp = file($sSomeFile);
opens the file, creates an array of strings representing each line of the files, then closes the
file. This was a huge time-saver for my swatch-style log reader.
For example, after executing, the array would read:
$aTemp[0] => "Dear Joe:"
$aTemp[1] => ""
$aTemp[2] => "Thanks for the order. Your shipment should"
$aTemp[3] => "arrive on Monday. Best Regards,"
$aTemp[4] => ""
$aTemp[5] => "Ann Marie"
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35367
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35367&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35367&report=yes