note 27441 added to function.fgetc
| From: | php-general at lists dot php dot net | Date: | Fri, 06 Dec 2002 01:22:29 +0000 |
| Subject: | note 27441 added to function.fgetc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40397@lists.php.net to get a copy of this message | ||
in this line:
while(($c = fgetc($f)) != 'X') fputs($f, $c); fclose($f);
the ($c = fgetc($f)) will always be interperreted as true.
when you assign a variable, it is always true.
True will never equal 'X'
--
http://www.php.net/manual/en/function.fgetc.php
http://master.php.net/manage/user-notes.php?action=edit+27441
http://master.php.net/manage/user-notes.php?action=delete+27441
http://master.php.net/manage/user-notes.php?action=reject+27441