Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29094 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43492 invoked by uid 1010); 28 Apr 2007 18:42:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43477 invoked from network); 28 Apr 2007 18:42:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2007 18:42:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=PelleRR@it-college.dk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=PelleRR@it-college.dk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain it-college.dk from 217.61.208.8 cause and error) X-PHP-List-Original-Sender: PelleRR@it-college.dk X-Host-Fingerprint: 217.61.208.8 mail.grenats.dk Windows XP Pro SP1, 2000 SP3 Received: from [217.61.208.8] ([217.61.208.8:22204] helo=gtspost1.gts.dk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/53-29267-A8593364 for ; Sat, 28 Apr 2007 14:42:19 -0400 Received: from mail.gts.dk [217.61.208.8] by gtspost1.gts.dk with XWall v3.38k ; Sat, 28 Apr 2007 20:42:15 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Apr 2007 20:42:04 +0200 Message-ID: <82F935820ADAF34089CFF7E6C49655B4013F3D4A@GTSPOST1.gts.dk> In-Reply-To: <46338E21.1050009@asbjorn.biz> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] While-else Thread-Index: AceJwOS3e+Z7yNuqS1+U/PRigLsMhgAA2DTg References: <82F935820ADAF34089CFF7E6C49655B4013F3D48@GTSPOST1.gts.dk> <46338E21.1050009@asbjorn.biz> To: =?iso-8859-1?Q?Asbj=F8rn_Sloth_T=F8nnesen?= Cc: X-CT-RefID: str=0001.0A090206.46339585.00BC,ss=1,fgs=0 Subject: RE: [PHP-DEV] While-else From: PelleRR@it-college.dk ("Pelle Ravn Rosfeldt") -----Original Message----- From: Asbj=F8rn Sloth T=F8nnesen [mailto:asbjorn@asbjorn.biz]=20 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. >=20 > 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=3D26411 I see. > Here's an example of what I mean: > --------------------- > $i =3D 1; > while ($i <=3D 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 =3D 11 or higher value. Yeah. You are absolutely right! My example is just to show how is should = look. - -- Best regards Asbj=F8rn Sloth T=F8nnesen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGM44gSViWlxucwuoRAlIrAJ9Xi5y7MkJCkNfW9lqtQ255D5uOWACeKNmU bNnKnuzxJhozYwchyZlOVzw=3D =3DCD+b -----END PGP SIGNATURE-----