RON_ron Posted November 12, 2010 Share Posted November 12, 2010 how do I use strtotime() instead of mktime()? $matchTimea = mktime($mHour, $mMinute, 0, $mMonth, $mDay, $mYear); if($matchTimea-time() < $cutoffTimea*60) { Quote Link to comment https://forums.phpfreaks.com/topic/218495-strtotime-instead-of-mktime/ Share on other sites More sharing options...
jdavidbakr Posted November 12, 2010 Share Posted November 12, 2010 strtotime() takes a string and converts it to a time. It's more flexible than mktime, it actually parses an english string. Check the php manual for strtotime() to see what it's capable of. Quote Link to comment https://forums.phpfreaks.com/topic/218495-strtotime-instead-of-mktime/#findComment-1133485 Share on other sites More sharing options...
ManiacDan Posted November 12, 2010 Share Posted November 12, 2010 Note that mktime is orders of magnitude faster than strtotime. Use mktime whenever possible. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/218495-strtotime-instead-of-mktime/#findComment-1133495 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.