I have this:
$startdate = date("Y-m-d", strtotime('2015-' . $startmonth . '-01'));
But instead of filling in the year, how do I get the current year?
You can use date('Y')
$startdate = date("Y-m-d", strtotime(date('Y') . '-' . $startmonth . '-01'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With