Vivid Lust Posted January 31, 2010 Share Posted January 31, 2010 Hi, I'm wanting to check if a time() was more than 5 minutes ago, something like below but with the gaps filled in: function isMoreThanFiveMinutes($time){ $fiveMinutesAgo = $time - X return ( ($time > $giveMinutesAgo ) ? true : false ); } I hope someone can help, thanks lots! Link to comment https://forums.phpfreaks.com/topic/190461-check-if-more-than-5-minutes-ago/ Share on other sites More sharing options...
jl5501 Posted January 31, 2010 Share Posted January 31, 2010 strtotime('- 5 minutes'); Link to comment https://forums.phpfreaks.com/topic/190461-check-if-more-than-5-minutes-ago/#findComment-1004651 Share on other sites More sharing options...
jl5501 Posted January 31, 2010 Share Posted January 31, 2010 if your original $time is a unix timestamp Link to comment https://forums.phpfreaks.com/topic/190461-check-if-more-than-5-minutes-ago/#findComment-1004652 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.