数组计数+1,网站不加载

I've defined it

$array = array(
"0" => "2",
"1" => "4",
"2" => "6",
"3" => "8",
"4" => "10",
"5" => "12",
"6" => "14",
"7" => "16",
"8" => "18",
"9" => "20",
"10" => "22",
"11" => "24",
"12" => "26",
"13" => "28",
"14" => "30",
"15" => "32"
);

then it should count all numbers from 0 to 16

for($i=0; $i <= 16; $i++){

and I use it with $i for the number and $array[$i] for the defined value but it doesn't load, where is my error? btw before that I've tried to question it all like if 0 == ..... and it worked till 10 times repeated then it stopped showing the page.

Change $i <= 16; to $i < 16;.

Your for loop is going past the end of the array you have defined.

for($i=0; $i < 16; $i++){
    echo $array[$i] . PHP_EOL;
}