Codice PHP:
<?php
$y = 0;
$i = 0;
$tabella2 = array(array());
while($y < 1) {
while(10 > $i) {
$tabella2[$i] = 'valore'.$i;
var_dump($i, $tabella2[$i]);
$i++; // POST increment
}
$y++; // Arriva solo fino a 1
}
?>
Expected result:
codice:
int(0)
string(7) "valore0"
int(1)
string(7) "valore1"
int(2)
string(7) "valore2"
int(3)
string(7) "valore3"
int(4)
string(7) "valore4"
int(5)
string(7) "valore5"
int(6)
string(7) "valore6"
int(7)
string(7) "valore7"
int(8)
string(7) "valore8"
int(9)
string(7) "valore9"
Altrimenti se tabella2 è impostata al primo while genera Warning (con l'output su STDERR o STDOUT e error_reporting (-1)) dopo il valore successivo a 0 di $i.