note 11168 deleted from Filesystem functions by zak
| From: | zak@php.net | Date: | Thu, 26 Jul 2001 08:17:43 +0000 |
| Subject: | note 11168 deleted from Filesystem functions by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15862@lists.php.net to get a copy of this message | ||
I needed to retrieve data from a file a line at a time so I wrote this:
function getline( $fp, $delim )
{
$result = "";
while( !feof( $fp ) )
{
$tmp = fgetc( $fp );
if( $tmp == $delim )
return $result;
$result .= $tmp;
}
return $result;
}