Posted by Jan Pieter Kunst on 12/19/05 19:26
In article <epspf.4827$It6.4454@fe02.lga>, Bob Stearns
<rstearns1241@charter.net> wrote:
> I thought that the given expression was always TRUE if "not_there"
> wasn't among the keys (or subscripts if you will) of $_SESSION.
I would always use:
if (isset($_SESSION['not_there'])) {
}
or
if (array_key_exists('not_there', $_SESSION)) {
}
in your case.
Try if that works better. I only use empty($var) when I am certain that
$var exists. (Note: I didn't follow your code step by step, so this may
be useless advice.)
JP
[Back to original message]
|