Demonic Posted July 29, 2007 Share Posted July 29, 2007 Ok I'm writing a script for my hosting company right. Pay every 30 days type deal. So I'm trying to get the total amount of days they didn't pay over thirty. For example: I paid hosting 31 days ago I want to get the amount of days they wen't over 30 they didn't pay for there hosting. So it should echo 1 since 31-30 = 1 but I'm trying to base it on the time() function how would I go about doing this? Quote Link to comment Share on other sites More sharing options...
Demonic Posted July 29, 2007 Author Share Posted July 29, 2007 Nvm I got it: <?php $tdaysago = time() - 2678400;//30days ago $get = (time() - $tdaysago)/86400; $result = $get-30; echo $result; ?> 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.