Re: fgets() question?
| From: | Steve Yates | Date: | Sun, 22 Dec 2002 08:43:24 +0000 |
| Subject: | Re: fgets() question? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129109@lists.php.net to get a copy of this message | ||
"Noel Wade" <noel_wade@hotmail.com> wrote in message
news:20021222061859.92972.qmail@pb1.pair.com...
> When you use $foo = fgets($fp_file); it appears that a blank line ends up
> looking exactly like a FALSE ("failed to read") return value...
A blank line should return the newline (\n or \r\n), according to
http://www.php.net/manual/en/function.fgets.php.
Also try using '===' (3 =
signs) as the operator, which enforces type checking on a comparison).
- Steve Yates
- If you only have a nail every tool looks like a hammer.
~ Taglines by Taglinator - www.srtware.com ~