Hi,
I’m sorry if this gets posted twice. The captcha keeps failing and then tells me I already posted.
I am a PHP newbie. So, thanks in advance for your patience if this has already been answered elsewhere. I searched, but could not locate a solution.
I have implemented the following PHP code generously provided by “Ask Michael Komarov.” It sequentially rotates content on my page when a visitor clicks the link. I want to sequentially rotate the content on a timed interval. I think I need to use a while(true) loop that include a sleep(10), but I have no idea how to trigger the PHP script the way the href link does.
I can move the print function anywhere on the page. Does the loop need to be inside this if structure, or somewhere else on the page?
I’m sure it’s simple, but it’s a mystery to me. Thanks for the advice.
[php]
<?php if (isset($content_rotation_list) && is_array($content_rotation_list) && count($content_rotation_list) > 0) { $next = isset($_GET["next"])? intval($_GET["next"]): 0; if (++$next >= count($content_rotation_list)) $next = 0; include($content_rotation_list[$next]); print "Refresh"; } ?>[/php]