Re[2]: [PHP] assignment operator works for comparison??

From: Date: Wed, 11 Apr 2001 07:29:34 +0000
Subject: Re[2]: [PHP] assignment operator works for comparison??
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-48122@lists.php.net to get a copy of this message
Hello Dan, Wednesday, April 11, 2001, 1:29:22 AM, you wrote: >> >> > if($shiny = 0){ >> This does not compare anyting, it assigns 0 to $shiny D> yes i know, but shouldnt this operation return true? No. This operator returns the value assigned (0 in this case, which is false). This expression will always return false. -- Best regards, Maxim Derkachev mailto:kot@books.ru Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia  

« previous php.general (#48122) next »