Re: undefined constant?
| From: | Jason k Larson | Date: | Mon, 06 Jan 2003 11:54:38 +0000 |
| Subject: | Re: undefined constant? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130387@lists.php.net to get a copy of this message | ||
How about if you quote index/key names in arrays like:
if($_GET['test'] == "test") { echo "A"; }
HTH,
Jason k Larson
Markus Jäntti wrote:
If have this piece of code (test.php): <? if($_GET[test] == "test") { echo "A"; } else { echo "B"; } ?> I open the file in my browser like this: localhost/test.php?test=test and get this page: Notice: Use of undefined constant test - assumed 'test' in c:\programfiler\apache group\apache\htdocs\test.php on line 2 A Do I need to define test? How can I work around this annoying notice? Forgive me for my ignorance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php