Well, I tried the following script which works:
<?php
$i = 0;
while ($i < 5)
{
$x[$i] = 1;
$i++;
}
$i = 0;
while($x[$i])
{
echo value ".$i.": ".$x[$i]."<br>";
$i++;
}
?>
but the following does not:
<?php
//$i = 0;
while ($i < 5)
{
$x[$i] = 1;
$i++;
}
$i = 0;
while($x[$i])
{
echo value ".$i.": ".$x[$i]."<br>";
$i++;
}
?>
That is the same code as yours. It generates an array in the first while
loop and prints each value in the second one.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]