Answer the question
In order to leave comments, you need to log in
How to get next month from current month?
Good afternoon. I ask for help in deriving the next month from the current one, and one more.
That is, let's say we mean the standard function
date ("m");
// Грубо говоря, это текущий месяц, а как можно вывести следующий, имея только текущий?
// Ну код не верный, но, думаю, многие поймут о чем я
date("m", +1); //Июнь
date("m", +2); //Июль
Answer the question
In order to leave comments, you need to log in
$date = new \DateTime('now');
echo $date->modify('+1 month')->format('M');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question