-----Original Message----- From: Asbjørn Sloth Tønnesen [mailto:[EMAIL PROTECTED] Sent: 28. april 2007 20:11 To: Pelle Ravn Rosfeldt Cc: internals@lists.php.net Subject: Re: [PHP-DEV] While-else
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pelle Ravn Rosfeldt wrote: > Hi there. > > Is it possible to make a "while" with a "else"-statement in PHP6? > I know that it's not the first time this subject is up, but my research > shows that a lot of people miss it. Including me. > There's already a bug for it: http://bugs.php.net/bug.php?id=26411 I see. > Here's an example of what I mean: > --------------------- > <? > $i = 1; > while ($i <= 10) { > echo $i++; > } else { > echo "The while couldn't be executed!"; > } > ?> > --------------------- > Your example never enters the else part of the statement. A better > example would be using $i = 11 or higher value. Yeah. You are absolutely right! My example is just to show how is should look. - -- Best regards Asbjørn Sloth Tønnesen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGM44gSViWlxucwuoRAlIrAJ9Xi5y7MkJCkNfW9lqtQ255D5uOWACeKNmU bNnKnuzxJhozYwchyZlOVzw= =CD+b -----END PGP SIGNATURE----- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php