I wouldn't use iif, use instead the ternary operator because iif is deprecated
PHP Code:
// ############################################################################# /** * Essentially a wrapper for the ternary operator. * * @deprecated Deprecated as of 3.5. Use the ternary operator. * * @param string Expression to be evaluated * @param mixed Return this if the expression evaluates to true * @param mixed Return this if the expression evaluates to false * * @return mixed Either the second or third parameter of this function */ function iif($expression, $returntrue, $returnfalse = '')