Given an array which looks like this:
$months = array("mar","jun","sep","dec");
And the current month:
$current_month = date("m");
Is there a way to find the next closest month to the current month?
For example:
- if the current month is May, the result should be 'jun'
- if the current month is April, the result should be 'jun'
- if the current month is March, the result should be 'mar'
- if the current month is October, the result should be 'dec'