On Monday 25 March 2002 08:35, Martin Towell wrote: > "undefined variable" is when you try to use a variable before you set it, > eg $foobar > "undefined index" is when you try to reference an array index before you > set it, eg $foobar[10]
Just to extend the explanation further. The most common cause of undefined index is the use of unquoted array keys: $doo = array('dah' => 'dib'); echo $doo[dah]; # incorrect, undefined index error echo $doo['dah']; # correct, no error -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Life is a game of bridge -- and you've just been finessed. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php