Re: Undefined offset

From: Date: Tue, 09 Oct 2001 12:55:51 +0000
Subject: Re: Undefined offset
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-70460@lists.php.net to get a copy of this message
$my_ar = array(); and also you may use array_pad to fill the array with one command and the change the values in it. -- Andrey Hristov Web Developer IcyGEN Corporation BALANCED SOLUTIONS http://www.icygen.com On Tuesday 09 October 2001 15:49, you wrote: > Thanks for help > > But is there a way to properly declare > the array, so php doesn't have to warn? > > Andy. > ----- Original Message ----- > From: Andrey Hristov > Newsgroups: php.general > To: php-general@lists.php.net > Sent: Tuesday, October 09, 2001 2:45 PM > Subject: Re: [PHP] Undefined offset > > > This is because in php.ini (/etc/php.ini on *nix) the error_reporting is > set to E_ALL. You can change it to 0 for example but it's better when you > develop to set > error_reporting(0); > in your php scripts. this will override the setting from the php.ini > > after changing some things in php, restart the deamon/service of apache( > if the php is built as module ,not CGI) > > -- > Andrey Hristov > Web Developer > IcyGEN Corporation > BALANCED SOLUTIONS > http://www.icygen.com > > On Tuesday 09 October 2001 14:54, you wrote: > > Me again > > > > I changed from PHP Version 3 to Version 4.0.5 (Apache). > > > > Setting a value to an array $a[][] > > > > $a[ 2 ][ 5 ] = 4711; > > > > produces an warning > > > > Undefined offset 5 > > > > I got no declaration of $a because this was not needed with PHP 3. > > Application runs fine (except warning output). Who can help? > > > > Thanks a lot > > Andy.

« previous php.general (#70460) next »