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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php