I do I use a PHP function like time() to do something every 20 seconds?

The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Yes, most servers have a time limit on max execution time for running php. You should better try to use cron. And if your hosting doesn't support that then, don't worry! I have heard of external sites that offer cron services.

The if statement is run everytime someone loads the page. Maybe they do set a limit. I have hostgator, and the person in the online chat said that there was no limit to the amount of time. Perhaps he made a mistake, or misunderstood the question. But, anyway, I think that it is irrelevant, because I don't plan on having a infinite loop since I've discovered that this means that the page will load the HTML only up until the loop, and then wait until the loop outputs HTML.

I've decided to abandon this cool but complicated way to try out different fonts on my webpage. I was also planning to do other things, like writing a program to go through different combinations, giving me 20 seconds to look at each one, and automatically refreshing the page.