Re: [PHP] If Statements Array and Notice Undefined Index

2011-03-31 Thread Nicholas Cooper
On 31 March 2011 15:53, Stuart Dallas wrote: > On Thursday, 31 March 2011 at 15:45, Nicholas Cooper wrote: > Good day, > > > > I have three arrays A, B and C. Anyone of them might not have the 'id' > key > > set which will give the Notice "Undefined index: id". > > > > I just wanted to know what

Re: [PHP] If Statements Array and Notice Undefined Index

2011-03-31 Thread Stuart Dallas
On Thursday, 31 March 2011 at 15:45, Nicholas Cooper wrote: Good day, > > I have three arrays A, B and C. Anyone of them might not have the 'id' key > set which will give the Notice "Undefined index: id". > > I just wanted to know what the correct approach to this problem would be; > without maki

Re: [PHP] if() statements

2002-06-06 Thread Analysis & Solutions
On Thu, Jun 06, 2002 at 07:52:28PM +1000, Justin French wrote: > It's starting to get a noticeable (although not major) lag. It's probably > the multiple MySQL queries, which I'm going to attempt to minimise and > optimise, but it also brings me to a question about if(). > > does the process of

RE: [PHP] IF Statements

2002-05-16 Thread Patrick Lynch
Hi Jon, Your brackets are just a bit out of sync: Here is a version that parses. You will have to make sure that my change does not affect your intended logic. if ( ($this->checkReferralCB($this->benefitRef, $this->benefitNo,$this->childDOB)) && (!$this->checkLocation($this->

Re: [PHP] IF Statements

2002-05-15 Thread 1LT John W. Holmes
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->child

RE: [PHP] IF Statements

2002-05-15 Thread Jay Blanchard
[snip] People, hope you can help. The below IF statement is getting a PARSE error. Can anyone spot why? if (($this->checkReferralCB($this->benefitRef, $this->benefitNo, $this->childDOB)) && (!$this->checkLocation($this->post, "W")) && (!empty($this->childDOB))) || ($this->checkPregnancy($th

Re: [PHP] IF Statements

2002-05-15 Thread Michal Dvoracek
Hello, try this version :) if (($this->checkReferralCB($this->benefitRef, $this->benefitNo, $this->childDOB)) && (!$this->checkLocation($this->post, "W")) && (!empty($this->childDOB)) || ($this->checkPregnancy($this->benefitRef, $this->benefitNo))) Regards, Michal Dvoracek

Re: [PHP] IF Statements

2002-05-15 Thread Steven Apostolou
if (($this->checkReferralCB($this->benefitRef, $this->benefitNo, $this->childDOB)) && (!$this->checkLocation($this->post, "W")) && (!empty($this->childDOB))) || ($this->checkPregnancy($this->benefitRef, $this->benefitNo)) must be: if (($this->checkReferralCB($this->benefitRef, $this->

Re: [PHP] IF Statements

2002-05-15 Thread Rasmus Lerdorf
Your brackets don't match up. Use an editor that lets you do bracket-matching. Hit '%' in vi, for example. -Rasmus On Wed, 15 May 2002, Jon Yates wrote: > People, hope you can help. The below IF statement is getting a PARSE error. > Can anyone spot why? > > Cheers. > > Jon > > if (($this->c

RE: [PHP] IF Statements

2002-01-13 Thread Martin Towell
if (action == "list") { if (isset($clientcode)) // or just "if ($clientcode)" would work... { // extended listing here } else { // normal listing here } } else if -Original Message- From: Necro [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 2:09 PM To:

Re: [PHP] IF Statements

2002-01-13 Thread James Mclean
Hi, > My problem is working out how to evaluate this new part. I have normal > If > statements for the listing, adding, etc. But how can I get it to check > if > clientcode is present. If clientcode is not present I want it to load > the > list page as normal. But if the clientcode is present t

Re: [PHP] IF Statements

2002-01-13 Thread Bogdan Stancescu
if ($action=='list') { if (!$clientcode) { } else { } } I put the $clientcode test inside the $action test because I suppose you take different actions on $clientcode depending on $action - if that's not the case, simply switch the two if's. This assumes that $clientcode>0. If you al

Re: [PHP] "IF" statements

2001-05-22 Thread Steve Werby
"chris herring" <[EMAIL PROTECTED]> wrote: > if ($date == 24 && $hour == 3) { } > > But that doesn't work... Any help is appreciated Your logic is correct. If the code within the braces isn't working it's likely there's either an error in the code within the braces or $date and $hour aren't ret

RE: [PHP] "IF" statements

2001-05-22 Thread Maxim Maletsky
Why doesn't work? $date = 24; $hour = 3; if ($date == 24 && $hour == 3) { echo 'works'; } If does not print you 'works': the sky will crash to the ground. I think you just got confused elsewhere in your code. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PH

RE: [PHP] "IF" statements

2001-05-22 Thread Peter Houchin - SunRentals Australia
What's wrong with doing it like if ($date == 24) { if ($hour == 3) { do something } } ?? -Original Message- From: chris herring [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 12:58 PM To: [EMAIL PROTECTED] Subject: [PHP] "IF" statements