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) { 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. 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 Link to comment https://forums.phpfreaks.com/topic/218495-strtotime-instead-of-mktime/#findComment-1133495 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.