"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";
>>
>>
Justin & Jordan,
Thanks. The && was what I needed.
Albert Padley
On Aug 31, 2005, at 2:27 PM, Justin Francis wrote:
Albert Padley wrote:
I have the following nested ifs:
if ($row['date'] < '2005-10-02') {
if ($row['time'] < '12:00') {
if ($row['field'] == 'P5'
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
Albert Padley wrote:
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 statements are true,
>
> 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
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
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 statements are true, I always get the corre
7 matches
Mail list logo