Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29131 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5691 invoked by uid 1010); 2 May 2007 19:10:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5676 invoked from network); 2 May 2007 19:10:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 May 2007 19:10:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:2365] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/04-06175-822E8364 for ; Wed, 02 May 2007 15:10:34 -0400 Received: (qmail 24177 invoked by uid 98); 2 May 2007 19:10:33 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.01 (clamdscan: 0.88.7/3195. Clear:RC:1(127.0.0.1):. Processed in 0.101948 secs); 02 May 2007 19:10:33 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 2 May 2007 19:10:32 -0000 Received: from 216.230.84.67 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Wed, 2 May 2007 14:10:32 -0500 (CDT) Message-ID: <35014.216.230.84.67.1178133032.squirrel@www.l-i-e.com> In-Reply-To: <82F935820ADAF34089CFF7E6C49655B4013F3D48@GTSPOST1.gts.dk> References: <82F935820ADAF34089CFF7E6C49655B4013F3D48@GTSPOST1.gts.dk> Date: Wed, 2 May 2007 14:10:32 -0500 (CDT) To: "Pelle Ravn Rosfeldt" Cc: internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] While-else From: ceo@l-i-e.com ("Richard Lynch") On Sat, April 28, 2007 1:03 pm, Pelle Ravn Rosfeldt wrote: > 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. > > Here's an example of what I mean: > --------------------- > $i = 1; > while ($i <= 10) { > echo $i++; > } else { > echo "The while couldn't be executed!"; > } > ?> > --------------------- So it executes after the last iteration? No. It must only execute if there were no iterations?... Maybe I'm just an old fart, but I don't like it... :-v -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?