Forum Moderators: coopster
error_reporting(E_ALL);
Problem is with that I can't be lazy (yes I know that's the point) and do:
if($_SESSION['foo']){
...
}
Notice: Undefined index: loggedin in ... line 10
The following does the trick
if ( array_key_exits('foo',$_SESSION) and $_SESSION['foo'] ) {
...
}
but I'm wondering if there's a shorter way that won't generate an error. Anyone know of one?
<correction>I had blamed E_STRICT but it's actuall E_NOTICE that generates the Notice: error, oops...</correction>