function get_next_month($date) { $date = str_replace("/", "-", $date); $year=date("Y",strtotime($date)); $month=date("n",strtotime($date)) + 1; if ($month == 13) { $month = 1; $year++; } $day = date("t", mktime(0, 0, 0, $month, 1, $year)); return date("Y/m/d", mktime(0, 0, 0, $month, $day, $year)); }
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
get_next_month (See related posts)
Comments on this post
You need to create an account or log in to post comments to this site.
Related Posts
» Suexec'ed PHP-FastCGI on Apa... in apache php fastcgi suexec
» My lighttpd php-fastcgi conf... in php fastcgi lighttpd
» Print PHP errors to screen in php debugging
» Minimal extension-less build... in php fastcgi cgi
» Mod_PHP that co-exists with ... in php mod_php php-cli
» Example lighttpd config for ... in php lighttpd rails examples filenice
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails