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? Link to comment https://forums.phpfreaks.com/topic/62272-solved-stuck-with-a-lil-math/ 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; ?> Link to comment https://forums.phpfreaks.com/topic/62272-solved-stuck-with-a-lil-math/#findComment-309899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.