Re: Undefined index a different problem

From: Date: Tue, 07 Jan 2003 16:39:03 +0000
Subject: Re: Undefined index a different problem
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-130609@lists.php.net to get a copy of this message
These are not errors, but notices, you can get around it using: if(isset($i) && array_key_exists($GLOBALS, $i)) echo $GLOBALS[$i]; or you might prefer setting error_reporting to not display notices Mekrand wrote:
thanks but this time it gives 2 error, undefined variable i, undefined index i for $GLOBALS[$i] "Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message news:3E1AF819.2060703@webglobe.sk...
Mekrand wrote:
my problem is, i have a script that works well before php 4.2.3 its sth like that {.. for($i=0; $i<count($line); $i++); // loop line numbers ... } //2nd part { echo ("$i"); } now i changed second part as; echo("$GLOBALS[i]");
     
should not be echo("$GLOBALS[$i]");
and it gives me notice that undefined index i. how can i solve this problem? thanks
     


« previous php.general (#130609) next »