Here is my script. The program can't find values in $tri
array when I do $somma=$tri[$y]+$tri[$z];
?
I keep getting Notices, but why?
<?php
$tri=array(1,1);
for ($x=0;$x<=6;$x++) {
print_r($tri);
$count=count($tri);
$trinew=array();
for($y=0;$y<$count;$y++) {
$z=$y+1;
$somma=$tri[$y]+$tri[$z]; // <-- here is the problem
array_push($trinew,$somma);
}
array_unshift($trinew, 1);
$tri=$trinew;
}
?>