RE: [PHP] what's "undefined index" ?
| From: | Martin Towell | Date: | Mon, 25 Mar 2002 00:35:57 +0000 |
| Subject: | RE: [PHP] what's "undefined index" ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89952@lists.php.net to get a copy of this message | ||
"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]
-----Original Message-----
From: Kai Schaetzl [mailto:maillists@conactive.com]
Sent: Monday, March 25, 2002 11:31 AM
To: php-general@lists.php.net
Subject: [PHP] what's "undefined index" ?
When I enable display of warnings I get an "undefined index" warning
instead of an "undefined variable" for some variables.
Why and what's the difference?
Warning: Undefined index: KundeRemark in
C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line
138
Warning: Undefined variable: KundeStatusNeu_show in
C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line
192
Kai
--
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php