Has anyone see this "iif" in php before? What is that actually? I try to search the documentation for it in php.net but I cant found any. Anyone can give a simple example of how to use this "iif"?
The function iif
does not exist in the standard PHP libraries. But in most cases it is a 'short if expression' such as: (condition ? true : false)
.
copied from http://www.phpfreaks.com/forums/index.php?topic=124215.0
function iff($tst,$cmp,$bad) {
return(($tst == $cmp)?$cmp:$bad);
}
echo iff('one','two','three');
echo iff('four','four','ok');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With