Re: undefined constant?

From: Date: Mon, 06 Jan 2003 11:57:14 +0000
Subject: Re: undefined constant?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-130388@lists.php.net to get a copy of this message
quoting solved the problem thanks mate :) > 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 > >

« previous php.general (#130388) next »