All pastes #266681 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-12-04 09:16 UTC
rendered paste body
<?php
$array = array(1,2,3,4,5);
foreach ($array as $key => $val) {
$i = 1;
echo $i;
echo '<br>';
$i++;
}
?>

OUTPUT:
1
1
1
1
1


Why isn't this incrementing?