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
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to