The access function iif is very easy to check an expression and return a different value wether the expression is true or false.


function iif($expression, $returntrue, $returnfalse = ) {
    return (
$expression ? $returntrue : $returnfalse);
}
?>