M
M
minxpepper2021-10-01 18:51:30
PHP
minxpepper, 2021-10-01 18:51:30

How to find out what are the months between dates in PHP?

There are two dates a = 01/01/2021 and b = 03/20/2021, how to find out what months are there and how many days will there be in this month?
The result should be something like this: [01=>31.02=>28.03=>20]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Zelikov, 2021-10-02
@gzmone

https://www.php.net/manual/ru/ref.datetime.php very useful thing)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question