Intstrtotime (stringtime [, intnow]) This function is expected to accept a string containing an English date format and try to parse it into a UNIX timestamp. Unix timestamp
If the time format is absolute time, the now parameter does not work. If the time format is relative time, the relative time is provided by now, or if the now parameter is not provided, the current time is used. -1 is returned if the request fails.
Echo strtotime ("now"), "\ n ";
Echo strtotime ("10 September 2000"), "\ 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 mktime.