Yes, any integer would work.  The number would act as a limiter to prevent indefinate 
loops.
Thus, if $search had 2000 values, and you put it into a for1000() loop, it'd stop at 
1000.  If $search had 100 values, it'd stop at 100.
This is an easy thing to code in, yes, but its annoying to have to code in limits for 
each and every loop.

--- Bug Database <[EMAIL PROTECTED]>
> wrote:
>ID: 10653
>Updated by: cynic
>Reported By: [EMAIL PROTECTED]
>Old-Status: Open
>Status: Bogus
>Bug Type: Feature/Change Request
>Operating system: 
>PHP Version: 4.0.5
>Assigned To: 
>Comments:
>
>hm, would you also want while23859() ?
>
>also, would for1000($i=0;$i<count($search);$i++) {...}
>loop 1000 times even if $search contained less than 1000 values? plainly, you have 
>this kind of functionality in any language. in PHP, your examples would look like 
>this:
>
>$i = 0 ;
>while( 100 > $i ) {
>    $i++ ;
>    $rec = mysql_fetch_row( $res ) ...
>}
>
>and 
>for( $i = 0 ; 1000 > $i && count( $search ) > $i ; $i++ ) ...
>
>Previous Comments:
>---------------------------------------------------------------------------
>
>[2001-05-03 17:49:53] [EMAIL PROTECTED]
>Looping structures should (IMO) all have a limiting variant.
>
>For example,
>while100($rec=mysql_fetch_row($res)) {...}
>
>Would only loop 100 times
>
>for1000($i=0;$i<count($search);$i++) {...}
>
>Would loop 1000 times, etc.
>
>---------------------------------------------------------------------------
>
>
>
>ATTENTION! Do NOT reply to this email!
>To reply, use the web interface found at http://bugs.php.net/?id=10653&edit=2

_____________________________________________________________
Get your own FREE email at www.FelFel.com

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to