Hi Harry,
> can someone explain this for me:
> ...
> $sFont =submit("font") ? SITE_ROOT . PROG_PATH . submit("font") : "";
> ...
It's called the "ternary operator", and it's a shorthand for if...else...
The line you're asking about is equivalent to:
if (submit("font")) {
$sFont = SITE_ROOT . PROG_PATH . submit("font");
} else {
$sFont = "";
}
The format is:
(condition to check) ? (result if true) : (result if false);
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php