Pelle Ravn Rosfeldt wrote:
Python & Perl already have this function. So why not PHP?
It could be very useful in an SQL query, if it doesn't return anything.
in Python else clause is executed if while is not ended by break. So it
makes sense when you searching for something:
It can't be e
Am Donnerstag, 3. Mai 2007 09:34 schrieb Andrew Brampton:
> I have wanted to use this kind of syntax a couple of times, for example:
> while ($line = mysql_fetch_array(...)) {
> echo $line;
> } else {
> echo 'Sorry no records';
> }
> ?>
This example leaves me speechless.:)
Regard,
Olive
On Thu, May 3, 2007 2:34 am, Andrew Brampton wrote:
> - Original Message -
>> 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
>>>
On 28/04/07, Pelle Ravn Rosfeldt <[EMAIL PROTECTED]> 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.
Here's an example of what I mean:
---
On Thu, May 03, 2007 at 08:36:00AM -0400, Sean Bright wrote:
> This fails the "Make PHP code easier to read" test I think. But it passes
> the "I'm a lazy programmer" test with flying colors! ;-)
>
> I mean seriously, what real value does this add to the language? Its just
> syntactic sugar to s
This fails the "Make PHP code easier to read" test I think. But it passes
the "I'm a lazy programmer" test with flying colors! ;-)
I mean seriously, what real value does this add to the language? Its just
syntactic sugar to save yourself a few keystrokes.
On 5/3/07, Andrew Brampton <[EMAIL PRO
- Original Message -
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 o
It can save you one if-statement, where the condition would be identical to
the where condition.
Example:
if ($i <= 10)
{
while ($i <= 10)
{
$i++;
}
}
else
{
echo "$i is more than 10\n";
}
I personally hate overspecifications, and this is one situation where that's
the case. So act
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:
>
Am Samstag, 28. April 2007 20:03 schrieb Pelle Ravn Rosfeldt:
> Python & Perl already have this function.
> It could be very useful in an SQL query, if it doesn't return anything.
Perl: "There's always more than one way to do it."
Best Regards,
Oliver
--
PHP Internals - PHP Runtime Developm
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?
&
-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.
>
&
-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
13 matches
Mail list logo