PHP 4.0 Bug #9173 Updated: getline
| From: | cynic@php.net | Date: | Thu, 08 Feb 2001 15:02:19 +0000 |
| Subject: | PHP 4.0 Bug #9173 Updated: getline | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46028@lists.php.net to get a copy of this message | ||
ID: 9173
Updated by: cynic
Reported By: amandato@unitedmcgill.com
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To:
Comments:
please, read the manual: fgets does what you want.
Previous Comments:
---------------------------------------------------------------------------
[2001-02-08 09:47:41] amandato@unitedmcgill.com
Add a getline feature to the file and string routines. is it possible to incorporate the iostream
style stdin/stdout in php?
this is the getline i wrote:
function getline( $fp, $delim )
{
$result = "";
while( !feof( $fp ) )
{
$tmp = fgetc( $fp );
if( $tmp == $delim )
return $result;
$result .= $tmp;
}
return $result;
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9173&edit=2