Re: [PHP] Loop error?

2001-08-14 Thread Daniel Adams

because you have a semicolon after while ($count > $i) so that it never
increments $i. :-) oops

On Tue, 14 Aug 2001, PHP List wrote:

> Hi,
> Can anyone tell me why this is a never ending loop?
>
> $i=0;
> $count = 1;
> while ($count > $i);
> {
> echo "$i ";
> $i++;
> }
> Chris
>

-- 


-- 
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]




Re: [PHP] Loop error?

2001-08-14 Thread PHP List

Oops, well, that is just mental.
Must be getting tired or something, yes, that's it :)

Thanks.


- Original Message - 
From: "Gyozo Papp" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]>
Sent: Tuesday, August 14, 2001 4:58 PM
Subject: Re: [PHP] Loop error?


> Hi,
> 
> clear that semicolon(;) after the while statement!
> 
> this makes the trick
> - Original Message - 
> From: "PHP List" <[EMAIL PROTECTED]>
> To: "php" <[EMAIL PROTECTED]>
> Sent: 2001. augusztus 15. 01:49
> Subject: [PHP] Loop error?
> 
> 
> Hi,
> Can anyone tell me why this is a never ending loop?
> 
> $i=0;
> $count = 1;
> while ($count > $i);
> {
> echo "$i ";
> $i++;
> }
> Chris
> 


-- 
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]




RE: [PHP] Loop error?

2001-08-14 Thread Andrew Braund

> -Original Message-
> From: PHP List [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 15 August 2001 09:20
> To: php
> Subject: [PHP] Loop error?
> 
> 
> Hi,
> Can anyone tell me why this is a never ending loop?
> 
> $i=0;
> $count = 1;
> while ($count > $i);
 ^ 

> {
> echo "$i ";
> $i++;
> }
> Chris


-- 
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]




Re: [PHP] Loop error?

2001-08-14 Thread Gyozo Papp

Hi,

clear that semicolon(;) after the while statement!

this makes the trick
- Original Message - 
From: "PHP List" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: 2001. augusztus 15. 01:49
Subject: [PHP] Loop error?


Hi,
Can anyone tell me why this is a never ending loop?

$i=0;
$count = 1;
while ($count > $i);
{
echo "$i ";
$i++;
}
Chris



--
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]