note 103641 added to function.date
| From: | falkon303 at gmail dot com | Date: | Mon, 25 Apr 2011 23:09:28 +0000 |
| Subject: | note 103641 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179128@lists.php.net to get a copy of this message | ||
I thought this function was super simple to understand, and very useful. I hope some of you find it
useful.
<?php
/// These are the variables you'd set to your needs
$month = "4";
$day = "25";
$year = "2011";
function date_finder($increment, $month, $day, $year)
{
return date("F-d-Y", strtotime($increment, mktime(0, 0, 0, $month, $day, $year)));
}
$last_month = date_finder("-1 month", $month, $day, $year);
echo $last_month;
?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.227.227.185
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/103641
Del: integrated -- https://master.php.net/note/delete/103641/integrated
Del: useless -- https://master.php.net/note/delete/103641/useless
Del: bad code -- https://master.php.net/note/delete/103641/bad+code
Del: spam -- https://master.php.net/note/delete/103641/spam
Del: non-english -- https://master.php.net/note/delete/103641/non-english
Del: in docs -- https://master.php.net/note/delete/103641/in+docs
Del: other reasons-- https://master.php.net/note/delete/103641
Reject -- https://master.php.net/note/reject/103641
Search -- https://master.php.net/manage/user-notes.php