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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php