> -----Original Message----- > From: Noel Wade [mailto:[EMAIL PROTECTED]] > Sent: 22 December 2002 09:44 > > > 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). > > Yes or no: > > $foo == FALSE === 0;
Erm -- no, I think. At any rate, FALSE===0 is false! Is that what you meant? > > Right now I'm just doing > > if($foo) > > And "\n" seems to equate to FALSE with this sort of conditional / > comparison... Well, it shouldn't, so I'm beginning to suspect that your $foo doesn't contain what you think it does. According to the PHP manual, 'the following values are considered FALSE: the boolean FALSE itself; the integer 0 (zero); the float 0.0 (zero); the empty string, and the string "0"; an array with zero elements; an object with zero member variables; the special type NULL (including unset variables)'. As "\n" is none of those, it should be ==TRUE (but, of course, !==TRUE). Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php