This is a way of doing it:
$s = time() + 10;
for ($i = time(); $i <= $s; $i++) {
print $i;
}
Will run for about ten seconds...
/Johan
Brendan Gogarty wrote:
>
> hi,
> just wondering if there was any easy way to break/escape from a loop
> (for loop) if the loop exceeds a maximum time.
> I realise that set_timeout applies to the whole script but i am just
> interested in a sub function of the script.
>
> cheers!
> brendan.
>
> --
> PHP Windows 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]
--
PHP Windows 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]