SyntaxFix
Write A Post
Hire A Developer
Questions
Here is a simple and more update format of getting the data:
$now = new \DateTime('now'); $month = $now->format('m'); $year = $now->format('Y');