The interrotation of time stamp function and time in PHP
[code]$year= ((int) substr (.Quot; 2008-12-04.quot; 0,4)); / / / / acquired
$month= (int) substr. H, $day, $year)..quot;.Lt; br.gt;.Quot; [/code]
[code]echo date. "2009-1-22")
examples are as follows:
[code]echo strtotime ("2009-1-22"); [/code]
results: 1232553600
Description: return to January 22, 2009 0 points, 0 minutes, 0 seconds,
two, PHP time stamp function to obtain English text date time example:
easy to compare, use when the time will be the time Stamp and specified timestamp conversion into system time
(1) print tomorrow's timestamp strtotime ("1 day")
current time: [code]echo date ("Y-m-d H:i:s", time ()); [/code]
results: 1 Ay))); [/code]
results: 2009-01-23 09:40:25
(2) print yesterday's timestamp strtotime ("-1 day")
the current time: [code]echo date ( ("-1 day")); [/code] results: 2009-01-21 09:40:25
(3) print the time stamp of the next week at the time stamp strtotime ("1 week")
the present time: echo date. Result: 2009-01-29 09:40:25
(4) print the time stamp of the last week at strtotime ("-1 week")
the current time: [code]echo date ("Y-m-d H:i:s"). [/code]
results: 2009-01-15 09:40:25
(5) print the timestamp of the next week, strtotime ("next Thursday")
the current time: [code]echo date. Rtotime ("next Thursday")); [/code]
results: 2009-01-29 00:00:00
(6) print the timestamp of last week's timestamp strtotime ("last Thursday")
E ("Y-m-d H:i:s", strtotime ("last Thursday")) results: the 2009-01-15 00:00:00
PHP timestamp function example shows that strtotime can parse the date and time description of any English text as a Unix timestamp. The date of the date.