From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.5
PHP version: 4.1.2
PHP Bug Type: Scripting Engine problem
Bug description: Loop not looping
Please see below. I have included all information possible that could be
of assistance. This looks possibly like, the array is too deep, or
perhaps a type not being an int, but I honestly think it's something else.
I hope it's not me. I've been staring at this for a long time and had
other look at it. :) Thanks Paul
/* This is the output from print_r that in the function below */
Array ( [Domain] => www.test.com [Start IP] => 64.24.23.32 [End IP] =>
6.23.23.23 [Netmask] => 255.255.255.255 [Number of Disks] => 2 [Disk Type]
=> ide [Enable Raid] => Y [Disk Sizes] => Array ( [0] => Array ( [SIZE] =>
40 [/] => 39 [Swap] => 1 ) [1] => Array ( [SIZE] => 40 [/home] => 40 ) ) )
function do_last(){
global $SESSION_DATA
/* See above for output -- Used for debugging
print_r($SESSION_DATA); */
while(list($key,$value) = each($SESSION_DATA)){
print $key . "<br>";
/* Handle a special key */
if($key == "Disk Sizes"){
/* This following code should output 2 values that are
stored in the array, but if a un-comment out "print $a", the value is
initially 2. What happened to it being 0? */
for($a=0;$a<count($SESSION_DATA[$key]);$a++){
//print $a;
print $SESSION_DATA[$key][$a]["SIZE"] . "<br>";
}
}
else{
print $value . "<br>";
}
}
--
Edit bug report at http://bugs.php.net/?id=16199&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16199&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16199&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16199&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16199&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16199&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16199&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16199&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16199&r=submittedtwice