Now I am working in project there I need some dates for my calcluations. Actually I need nth day of each month between two dates.
For example if I need 12th
day of each month between 01-10-2014
and 14-02-2015
. Consider I have the following code:
//date format is d-m-Y
$start_date = "01-10-2014";
$end_date = "14-02-2015";
$needed_day = 12;
$result = array(); //array for getting result dates
//codes here
var_dump($result);
Then the result array must be like,
array (size=5)
0 => string '12-10-2014' (length=10)
1 => string '12-11-2014' (length=10)
2 => string '12-12-2014' (length=10)
3 => string '12-01-2015' (length=10)
4 => string '12-02-2015' (length=10)
Please help me to find a solution.