Re: [PHP] Nested IFs Problem

2005-08-31 Thread Satyam
"Jim Moseby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> >> I have the following nested ifs: >> >> if ($row['date'] < '2005-10-02') { >> if ($row['time'] < '12:00') { >> if ($row['field'] == 'P5' ) { >> >> echo "Success"; >> >>

Re: [PHP] Nested IFs Problem

2005-08-31 Thread Eric Gorr
Albert Padley wrote: Whenever the 3 if statements are true, I always get the correct "Success" to echo. However, if any or all of the if statements are false, I never get "Failed" to echo. I know it's something simple, but I just can't see it at the moment. The code is doing exactly what y

RE: [PHP] Nested IFs Problem

2005-08-31 Thread Jim Moseby
> > I have the following nested ifs: > > if ($row['date'] < '2005-10-02') { > if ($row['time'] < '12:00') { > if ($row['field'] == 'P5' ) { > > echo "Success"; > > } > } > } > > else { > > echo "Failed"; > } > > > Whenever the 3 if

Re: [PHP] Nested IFs Problem

2005-08-31 Thread Jordan Miller
why not rewrite it to be more concise... i can't see a problem at the moment. are you sure you can do a "<" comparison operator on the '12:00' and '2005-10-02' string?? Maybe if you are using 24 hr format you could just get rid of the ":" on both sides of the operator to have the "<" proper