FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » strange behaviour in assignment expr.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
strange behaviour in assignment expr. [message #172848] Sat, 05 March 2011 13:02 Go to previous message
Marc van Lieshout is currently offline  Marc van Lieshout
Messages: 10
Registered: March 2011
Karma:
Junior Member
I try to read in a source file, line by line, within a loop

This works:

$text = fgets($fh);
if ($text === false)
break;

This doesn't, and always breaks on the first line:

if (($text = fgets($fh)) === false)
break;

What's wrong with that? Am I missing something?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [ANN]VTD-XML 2.10
Next Topic: having trouble using gd imageline in foreach loop
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 07:12:06 GMT 2024

Total time taken to generate the page: 0.12326 seconds