Bug #16131: For Loop not working (honestly)
| From: | paul79 at optonline dot net | Date: | Mon, 18 Mar 2002 02:43:35 +0000 |
| Subject: | Bug #16131: For Loop not working (honestly) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-2722@lists.php.net to get a copy of this message | ||
From: paul79@optonline.net
Operating system: FreeBSD 4.5
PHP version: 4.1.2
PHP Bug Type: Scripting Engine problem
Bug description: For Loop not working (honestly)
Please note the following code, and keep the following in mind.
$disk_$x_name is an array posted from a previous page.
(ex. <input name='disk_0_name[]'><input name='disk_0_name[]'>)
The same thing goes for $total_disks.
This particular loop only outputs "0 => 3" one time, and stops. Why? The
value of $num_part is 3. It should at least print it that many of times?
Bug?
<?
for($x=0;$x<count($total_disks);$x++)
{
eval('$num_part = count($disk_' . $x . '_name);');
for($y=0;$y<count($num_part);$y++)
{
print $y . " => " . $num_part . "<br>";
}
}
?>
--
Edit bug report at http://bugs.php.net/?id=16131&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16131&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16131&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16131&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16131&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16131&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16131&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16131&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16131&r=submittedtwice