PHP Date() Function
The PHP date() function is used to format a time and/or date.
Example
Code:<?php echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y-m-d"); ?>
Out put:
11/11/15
2011.11.15
2011-11-15
PHP Date() Function
The PHP date() function is used to format a time and/or date.
Example
Code:<?php echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y-m-d"); ?>
Out put:
11/11/15
2011.11.15
2011-11-15
PHP Date() - Adding a Timestamp
To go one day in the future we simply add one to the day argument of mktime():
Code:<?php $tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y")); echo "Tomorrow is ".date("Y/m/d", $tomorrow); ?>
Out put: Tomorrow is 2011/11/16
thanks , very good !
it's not hard to study
Bookmarks