I am trying to retrieve the 1st day of the next month to the last day of that month. But Im struggling to do it. These are going to eventually be a condition on a database query. This is the code I have so far:
Check out the PHP docs for mktime, specifically the order of arguments!
Paul Davey Whitford Church "Everyone who calls on the name of the Lord will be saved." Romans 10:13 "For all have sinned and fall short of the glory of God, and are justified
Hey,
I am trying to retrieve the 1st day of the next month to the last day of that month. But Im struggling to do it. These are going to eventually be a condition on a database query. This is the code I have so far:
This outputs: Live Code
$current_date = date("Y-m-d");
$next_month = date("m") + 1;
$next_month = date("Y-m-d", mktime(0, $next_month, 0));
echo $next_month;
Ive spent a couple of hours on this now, and Im really struggin, any ideas would be great. thanks.