Page 1 of 1

IIF help

Posted: Fri Sep 05, 2003 4:54 pm
by ericsodt
I have the function IIF:

function iif($expression,$true,$false){
if($expression){
return $true;
}else{
return $false;
}
}

When I call it:

<? iif(1=1,'yes', 'no'); ?>

I get a parse error... can anyone shed some light ontot this???

Re: IIF help

Posted: Fri Sep 05, 2003 5:02 pm
by ericsodt
fixed... nevermind

ericsodt wrote:I have the function IIF:

function iif($expression,$true,$false){
if($expression){
return $true;
}else{
return $false;
}
}

When I call it:

<? iif(1=1,'yes', 'no'); ?>

I get a parse error... can anyone shed some light ontot this???

Posted: Fri Sep 05, 2003 5:06 pm
by JAM
Share the light, how did you fix it?