If the format of time is absolute, then the now parameter does not work. If the format of time is relative, its relative time is provided by now, or if it is not supplied with the current time. Returns-1 on failure.
Echo Strtotime ("Now"), "\ n";
Echo Strtotime ("Ten September"), "\ n";
Echo strtotime ("+1 Day"), "\ n";
Echo strtotime ("+1 Week"), "\ n";
Echo strtotime ("+1 Week 2 days 4 hours 2 Seconds"), "\ n";
Echo Strtotime ("next Thursday"), "\ n";
Echo Strtotime ("Last Monday"), "\ n";
?> $str = ' not good ';
if ($timestamp = Strtotime ($str)) = = = 1) {
echo "The string ($STR) is bogus";
} else {
echo "$str = =". Date (' L DS of F Y h:i:s A ', $timestamp);
}
?>
This effect is the same as with Mktime ().
http://www.bkjia.com/PHPjc/319828.html www.bkjia.com true http://www.bkjia.com/PHPjc/319828.html techarticle if the format of time is absolute, then the now parameter does not work. If the format of time is relative, its relative time is provided by now, or if the now parameter is not provided when ...