RE: [PHP] A quick question

From: Date: Wed, 11 Oct 2000 22:24:41 +0000
Subject: RE: [PHP] A quick question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19714@lists.php.net to get a copy of this message
hi Joao, according to page 110 of "Proffessional PHP programming" (wrox press) the operator " ==" means equal to... while the operators "=" and "!=" are right associative assignments... therefore using the logic if ($val =="abc") { means if the value of $val is equal to "abc" then ... while if ($val = "abc") means assign the value of abc to $val and then execute the insides of the curly braces. This will ALWAYS be true in your example..... then again, its only a book ;-) - and we are all human ! richard (firm believer in PERL's TMTOWTDI ) -----Original Message----- From: Joao Prado Maia [mailto:jpm@kefta.com] Sent: Wednesday, October 11, 2000 11:04 AM To: richard Subject: RE: [PHP] A quick question On Wed, 11 Oct 2000, richard wrote: > should be if (!($value == "blah.blah") { > > as "=" is an assignment, so is "!=".... > > Err.. actually "!=" is not an assignment operator, as far as I know. I mean, if that is what you meant. Joao -- Joao Prado Maia Web Developer Kefta, Inc. T: (415) 391-6881 ext 8008 F: (415) 391-7079

« previous php.general (#19714) next »