Hi:
The following code can randomly choose the text to display in a web page article,
but how can a timer be added to it? Say, I want to randomly choose to display
different text only every 24 hours.
Thanks
Code:<?php $articles = array( 'article 1 text' , 'article 2 text' , 'article 3 text', 'article 4 text', 'article 3 text' ); $arrayNo = rand(0,4); ?> Then echo them out onto the page. <?php echo $article[$arrayNo]; ?>
Bookmarks