// Ok, I have a loop:
for ($i = $Date; $i >= $sDate; $i--)

// Somthing like this is inside the loop:
if ($Exists)
 echo "Something here.";
else
 $sDate--;

I have it check if it exists, if it doesn't, then it reduces $sDate by 1.
$sDate is initially 3 to 31 days less than $Date.
By reducing $sDate by 1, it keeps looking, what if there are no more?
It keeps going until I reach 30 seconds, how can I set a time limit?

I have it on: http://zavaboy.jimbug.org/phptest/blog.php
Go to May 14, 2003 wait 30 seconds for the page to load and you'll see what
I mean.
I don't want it to last 30 seconds and a error, I want 3 seconds max and no
error.


"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote zavaboy ([EMAIL PROTECTED]):
> > How do I set execution time for a for() loop?
> > Like I have a loop stop once it finds 3 things, but what happens when
there
> > are only 2 things? It keeps looking for 30 seconds then shows this
error:
> > Fatal error: Maximum execution time of 30 seconds exceeded in...
> >
> > How can I set it to 3 seconds without a error?
>
> What you explained seems that you're doing something wrong... can
> you provide a small example of what you want to get done?
>
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

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

Reply via email to