same from :
header("Location: ".(empty($SESSION["wantsurl"]) ? $CFG->wwwroot :
$SESSION["wantsurl"]));
Exit;
or, if not readable enough then:
if(empty($SESSION["wantsurl"])) {
$goto = $CFG->wwwroot;
}
else {
$goto = $SESSION["wantsurl"];
}
header("Location:
These are called (well, one name for it), is ternary operator. It's not
PHP specific and a search on google will find some results. Regarding
PHP, brief discussion (with examples) can be found at the following
locations :
http://www.php.net/manual/language.expressions.php
http://www.php.net/m
www.php.net/empty
www.php.net/header
the x ? Y : z; form is a quick n easy structure that works like if/else
do a search for classes and objects for the $CFG->wwwroot part
jack
-Original Message-
From: Rehuel Lobato de Mesquita [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 12:
3 matches
Mail list logo