At 12:44 PM -0800 2/24/01, Felipe Lopes wrote:
>I was trying to code the following script using while instead of for,
>but I'm havig a lot of problems...Is it possible to do what I want?
>
>for ($count = 0; $count <= 10; $count++){
>echo "Number is $count \n";
>}
>
>Could anyone tell me how is it
TECTED]]
Sent: Wednesday, January 24, 2001 2:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Using while as for...
I was trying to code the following script using while instead of for,
but I'm havig a lot of problems...Is it possible to do what I want? for
($count = 0; $count <= 10; $count++){ e
Whups, forgot a blasted semicolon...
$count = 1;
while($count < 10)
{
echo "Number is $count \n";
$count++;
}
Cheers,
Andrew
On 2/24/01 12:20 AM, "Andrew Hill" <[EMAIL PROTECTED]> wrote:
> $count = 1;
>
> while($count < 10)
> {
>echo "Number is $count \n";
>$coun
$count = 1;
while($count < 10)
{
echo "Number is $count \n";
$count++
}
> for ($count = 0; $count <= 10; $count++){
> echo "Number is $count \n";
> }
>
> Could anyone tell me how is it with while instead of for??
> Thank you!!
Best regards,
Andrew
--
lt;= 10) {
echo "$count, ";
}
print "";
//counts from 1 to 11
$count=0;
while ($count++ <= 10) {
echo "$count, ";
}
> -Original Message-
> From: Felipe Lopes [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 24, 2001 02:46
> To: [E
I was trying to code the following script using while instead of for,
but I'm havig a lot of problems...Is it possible to do what I want?
for ($count = 0; $count <= 10; $count++){
echo "Number is $count \n";
}
Could anyone tell me how is it with while instead of for??
Thank you!!
Feli
6 matches
Mail list logo