On Friday 30 March 2001 16:25, you wrote:
> > Wouldn't doing it like this however be ok:
> > if ($result = mysql_query($query)) {
>
> I could be wrong, but I do not believe so. The
You are wrong :)
($result = mysql_query(...))
assigns a value to result, and the entire expression evaluates to that
value (i.e. the return value of mysql_query).
> if( $i = "bob" ) {
> // this will always run.
yes, because "bob" evaluates to true :)
>
> }
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
Even idiots can handle computers, and many do.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]