Re: Bug #14068: 2 while list each dont work
| From: | Andrey Hristov | Date: | Thu, 15 Nov 2001 18:58:13 +0000 |
| Subject: | Re: Bug #14068: 2 while list each dont work | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70553@lists.php.net to get a copy of this message | ||
Try
reset($a); before the first while, and reset($b) just before the second in
the body if the first.
On Thursday 15 November 2001 06:56 am, you wrote:
> From: witterstein@web.de
> Operating system: Linux
> PHP version: 4.0.5
> PHP Bug Type: Scripting Engine problem
> Bug description: 2 while list each dont work
>
> <?php
>
> $a[0]="x";
> $a[1]="y";
> $b[0]="z";
> $b[1]="w";
> $b[2]="u";
>
> while (list($key,$val)=each($a) )
> {
> while (list($key2,$val2)=each($b) )
> {
> print "$key: $val - $key2: $val2<br>";
> }
> }
> ?>
>
> './configure' '--with-mysql' '--with-apache=../apache_1.3.20'
> '--with-gd=../gd-1.8.3' '--enable-track-vars'
--
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com