I am trying to figure out on how to set my dates to every 15th and end of month only...what i'm getting so far is only +15 days from my current date.. current date = date today.LOGIC: if the current day is less than 15 then the start date of the loop is on the end of the month then if the current day is equal or greater than 15 then the start date of the loop is on the 15th. so in my case my current date is Nov 9 so the First output should be Nov 30.
$y = 1;
while ($y <= $num_term) { // num_term is equal to the number of output
$month_line = strtotime("15 day", strtotime("$month_sched"));
$day = date("d", $month_line);
$month_int = date("M-d", $month_line);
}
Output:
Nov 24`<br />`
Dec 9`<br />`
Dec 24`<br />`
Could anybody help me... thanks :)