troubleshooting Question

PHP: retrieve month and year of the next month

Avatar of Stef Merlijn
Stef MerlijnFlag for Netherlands asked on
PHP
15 Comments1 Solution862 ViewsLast Modified:
Hi,

I need a PHP function that will give me the written month (in Dutch) + Year of the next month (based on current date).

Something like GetMonthYear(Date);  // today is January 8th 2014

Result:
Februari 2014   (dutch for February 2014)

Translation of the month can probably be done in an array.

Found this function on the web to increase the month.
<?php 
function add_date($orgDate,$mth){ 
  $cd = strtotime($orgDate); 
  $retDAY = date('Y-m-d', mktime(0,0,0,date('m',$cd)+$mth,date('d',$cd),date('Y',$cd))); 
  return $retDAY; 
} 
?>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros