|
strtotimeParse about any English textual datetime description into a Unix timestamp Description
int strtotime
( string
$time
[, int $now = time()
] )
The function expects to be given a string containing an English date format
and will try to parse that format into a Unix timestamp (the number of
seconds since January 1 1970 00:00:00 UTC), relative to the timestamp given
in Each parameter of this function uses the default time zone unless a time zone is specified in that parameter. Be careful not to use different time zones in each parameter unless that is intended. See date_default_timezone_get on the various ways to define the default time zone. Parameters
Return Values
Returns a timestamp on success, Errors/Exceptions
Every call to a date/time function will generate a Changelog
Examples
Example #1 A strtotime example
<?php
Example #2 Checking for failure
<?php Notes
|