LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: adityabhai Date: Tue Oct 7 03:52:21 2008 Subject: note 86183 added to function.date
Aditya Bhatt (adityabhai [at] gmail [dot] com):
I have the current date & time, with me or any other date for which i want to check the month.
I want to display the next month using date function, it can be very helpful and a simple way to do this:
<?php
echo date('F j, Y, g:i a');
echo '<br />';
echo date('F j, Y, g:i a', strtotime('+1 month')); // Here you can change '+1 month' to n number of months you required in some of your calculation.
?>
----
Server IP: 59.162.86.33
Probable Submitter: 59.162.251.99
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/86183
Del: integrated -- https://master.php.net/note/delete/86183/integrated
Del: useless -- https://master.php.net/note/delete/86183/useless
Del: bad code -- https://master.php.net/note/delete/86183/bad+code
Del: spam -- https://master.php.net/note/delete/86183/spam
Del: non-english -- https://master.php.net/note/delete/86183/non-english
Del: in docs -- https://master.php.net/note/delete/86183/in+docs
Del: other reasons-- https://master.php.net/note/delete/86183
Reject -- https://master.php.net/note/reject/86183
Search -- https://master.php.net/manage/user-notes.php
| Navigate in group php.notes at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |