Re: snippet
| From: | David Nicholson | Date: | Tue, 05 Aug 2003 10:18:21 +0000 |
| Subject: | Re: snippet | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158259@lists.php.net to get a copy of this message | ||
Hello,
This is a reply to an e-mail that you wrote on Tue, 5 Aug 2003 at
11:14, lines prefixed by '>' were originally written by you.
> $sFont =submit("font") ? SITE_ROOT . PROG_PATH .
submit("font") : "";
it is the same as:
if(submit("font")){
$sFont = SITE_ROOT . PROG_PATH;
} else {
$sFont = "";
}
(see http://uk.php.net/language.operators.comparison)
submit() is a user defined function, if it evaluates to false then
$sFont will contain the value of those two constants put togetherm
otherwise it will be set to an empty string.
HTH
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Free PHP error handling script: www.phpmachine.com/error-handler/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/