Re: adding in array

From: Date: Tue, 10 Dec 2002 12:27:51 +0000
Subject: Re: adding in array
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-24002@lists.php.net to get a copy of this message
for($i=0;$i<5;$i++){ for($j=0;$j<5;$j++){ $new_array[$i]+=$j; } } for($i=0;$i<5;$i++){ print($new_array[$i]); } this works, so Vogt's solution should solve your problem > Lets say $year is 2000 > There is not defined index 2000 at $array. > It is going to be undefined offset. PHP is set up in a way that it handles that kind of problem itself, so no need to worry about undefined variables -Peter

« previous php.db (#24002) next »