cfgcjm Posted February 24, 2008 Share Posted February 24, 2008 I have this script <?php echo file_get_contents('/tip.txt'); ?> but i now need to have it rotate files every day through 5 different files (ie:tip1.txt, tip2.txt...) is there a way to do this? Quote Link to comment Share on other sites More sharing options...
AndyB Posted February 24, 2008 Share Posted February 24, 2008 date("z") will tell you the day of the year - from 0 to 365 http://ca.php.net/manual/en/language.operators.arithmetic.php modulus operator will tell you the remainder of a division. That should get you started Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.