On Fri, 10 May 2002, Jay Blanchard wrote:
> Just to clarify myself above...
> if ($var1 = $var2) { .....
> 
> In my crazy head, I see $var1 and $var2 to be in a sort of "read-only" state
> inside the () of the if statement.  For a if statement to be able to change
> the values in that instance, would be wrong for me.  Afterall, the logic of
> a if statement does go something in the lines of "if value equals value then
> execute this, else, execute that" etc etc etc.... There's nothing in that
> logic of setting or changing any values.... ?

What if you change your crazy head so that if means "if the expression 
inside these parenthesis evaluates to true", and then you'll be fine. 
Because you know that an expression can change values...

if ($c++ > 3)
if ($a = fgets(...))

etc.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to