Categories
How to find out how many years and months?
We need to find out how many years and months the child is based on the array
array(2) { [0]=> string(2) "08" [1]=> string(2) "16" }
Answer the question
In order to leave comments, you need to log in
$a = ['08', '16']; $diff = (new \DateTime())->diff(new \DateTime("20$a[1]-$a[0]-01"))->format('%yy %mm');
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question