Re: Simple loop problem
| From: | Ed Vul | Date: | Thu, 06 Jul 2000 17:57:51 +0000 |
| Subject: | Re: Simple loop problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5253@lists.php.net to get a copy of this message | ||
nevermind, im an idiot, i found my problem... i forgot to reset $j
""Ed Vul"" <edv@whitepj.com> wrote in message
news:8k2h3o$koo$1@toye.php.net...
> I've tried to figure out what my problem is so as to not make any more of
a
> fool of myself.... but I cant.
>
> here's the simple code (the original was actually useful, but i was trying
> to find the bug and this is what i narrowed it down to):
>
> $i = 0;
> $j = 0;
> while($i<128)
> {
> while($j<128)
> {
> printf("<br>%d\t%d\n",$i,$j);
> $j++;
> }
> $i++;
> }
>
>
> heres the problem:
> it only prints one instance of the nested loop... that is, it does not
> increment $i and it does not rerun the inside loop.
> I know there is some stupid mistake im making, but can you help me anyway?
>
> Thanks a lot
> Ed
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>