Re: [PHP] for loop break and continue

2003-09-27 Thread Becoming Digital
 Can't you let me have a shred of programming self-respect?
 
 Rich (I should have cracked the book) Fox

Get out!  No soup (or respect) for you! ;)

Edward Dudlik
Becoming Digital
www.becomingdigital.com



- Original Message - 
From: Rich Fox [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, 25 September, 2003 12:26
Subject: Re: [PHP] for loop break and continue


Can't you let me have a shred of programming self-respect?

Rich (I should have cracked the book) Fox

 On Thu, 2003-09-25 at 12:04, Rich Fox wrote:
  DOH!
 
  This is a new addition to PHP because it wasn't there before!
 
  Thanks for the slap.

 PHP has supported break for as long as I can remember which goes back to
 about 1999 and PHP 3.something.

 Cheers,
 Rob.

 -- 
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] for loop break and continue

2003-09-25 Thread Rich Fox
Hi,
Is there an equivalent to the C++ 'break' command to stop execution of a for
loop? I know I can use 'goto' but I don't want to unless I have to.

for ($i=0; $i$n; $i++)
if (some condition)
break;

And, what about 'continue' which skips the rest of the code in the for loop
and immediately goes on to the next iteration?

Thanks,

Rich

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for loop break and continue

2003-09-25 Thread Robert Cummings
Take the sample code below, paste it to a PHP file, add a real
conditional, execute script. Voila, you've taken the first step towards
helping yourself.

Cheers,
Rob.


On Thu, 2003-09-25 at 11:42, Rich Fox wrote:
 Hi,
 Is there an equivalent to the C++ 'break' command to stop execution of a for
 loop? I know I can use 'goto' but I don't want to unless I have to.
 
 for ($i=0; $i$n; $i++)
 if (some condition)
 break;
 
 And, what about 'continue' which skips the rest of the code in the for loop
 and immediately goes on to the next iteration?
 
 Thanks,
 
 Rich
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for loop break and continue

2003-09-25 Thread Rich Fox
DOH!

This is a new addition to PHP because it wasn't there before!

Thanks for the slap.


Robert Cummings [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Take the sample code below, paste it to a PHP file, add a real
 conditional, execute script. Voila, you've taken the first step towards
 helping yourself.

 Cheers,
 Rob.


 On Thu, 2003-09-25 at 11:42, Rich Fox wrote:
  Hi,
  Is there an equivalent to the C++ 'break' command to stop execution of a
for
  loop? I know I can use 'goto' but I don't want to unless I have to.
 
  for ($i=0; $i$n; $i++)
  if (some condition)
  break;
 
  And, what about 'continue' which skips the rest of the code in the for
loop
  and immediately goes on to the next iteration?
 
  Thanks,
 
  Rich
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for loop break and continue

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 12:04, Rich Fox wrote:
 DOH!
 
 This is a new addition to PHP because it wasn't there before!
 
 Thanks for the slap.

PHP has supported break for as long as I can remember which goes back to
about 1999 and PHP 3.something.

Cheers,
Rob.

-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] for loop break and continue

2003-09-25 Thread Rich Fox
Can't you let me have a shred of programming self-respect?

Rich (I should have cracked the book) Fox

 On Thu, 2003-09-25 at 12:04, Rich Fox wrote:
  DOH!
 
  This is a new addition to PHP because it wasn't there before!
 
  Thanks for the slap.

 PHP has supported break for as long as I can remember which goes back to
 about 1999 and PHP 3.something.

 Cheers,
 Rob.

 -- 
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] for loop break and continue

2003-09-25 Thread Jay Blanchard
[snip]
Can't you let me have a shred of programming self-respect?

Rich (I should have cracked the book) Fox
[/snip]

Nah, too easy! :) We all get bumped from time to time

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php