Re: what's "undefined index" ?

From: Date: Mon, 25 Mar 2002 16:31:27 +0000
Subject: Re: what's "undefined index" ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90047@lists.php.net to get a copy of this message
Your message of Mon, 25 Mar 2002 11:35:57 +1100: > "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] > Hi, thank you both for the explanation. It's clear why I get the "undefined", these variables *are* for various reasons undefined at the moment. However, there are NO arrays involved, f.i. "KundeRemark" is NOT an array it's a simple string variable created by $KundeRemark = stripslashes($val["KundeRemark"]); which is a field from a SQL result which currently doesn't exist because I changed the connection to a different db where this field is named differently. So, it's undefined, fine. But why is it called "undefined index" where it should be "undefined variable" ? > Warning: Undefined index: KundeRemark in > > C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line > > 138 > 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

« previous php.general (#90047) next »