Re: IF Statements

From: Date: Wed, 15 May 2002 14:27:14 +0000
Subject: Re: IF Statements
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97727@lists.php.net to get a copy of this message
When in doubt, add in some carriage returns to space everything out to see if your braces match up. if ( ($this->checkReferralCB($this->benefitRef, $this->benefitNo, $this->childDOB)) && (!$this->checkLocation($this->post, "W")) && (!empty($this->childDOB)) ) || ($this->checkPregnancy($this->benefitRef, $this->benefitNo)) You can see from that, that there is a brace missing around the entire statement. So your logic probably isn't working how you thought it would, either. You'll have to put it all back together to actually execute the code, but this will help you on large statements like this to make sure your logic and syntax is correct. ---John Holmes... ----- Original Message ----- From: "Jon Yates" <Jon.Yates@mi-services.com> To: <php-general@lists.php.net> Sent: Wednesday, May 15, 2002 10:03 AM Subject: [PHP] IF Statements > People, hope you can help. The below IF statement is getting a PARSE error. > Can anyone spot why? > > Cheers. > > Jon > > if (($this->checkReferralCB($this->benefitRef, $this->benefitNo, > $this->childDOB)) > && (!$this->checkLocation($this->post, "W")) && (!empty($this->childDOB))) > || ($this->checkPregnancy($this->benefitRef, $this->benefitNo)) > > > <<JYvCard.vcf>> > > ---------------------------------------------------------------------------- ---- > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#97727) next »