Re: notice:use of undefined constant: add-assumed 'add' in..........

From: Date: Tue, 06 Apr 2004 21:00:18 +0000
Subject: Re: notice:use of undefined constant: add-assumed 'add' in..........
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182550@lists.php.net to get a copy of this message
From: "Andy B" <aborka1@wmis.net> > i have something like this: > if(!empty($_SESSION['add']['start_date']) && !empty($_SESSION['add']['end_date'])..........)){ > > and i get the unexpected error: > notice:use of undefined constant: add-assumed 'add' in (filename)..... Double check your code. In order to get that Notice, you'd have to have $_SESSION[add], somewhere. Notice the missing quotes. In that case, "add" is interpreted as a constant, but since no such constant exists, PHP assumes you meant a string and uses that. ---John Holmes...

« previous php.general (#182550) next »