I wish to rewrite a mysql query which use month() and year() functions to display all the posts from a certain month which goes to my function as a \'Y-m-d\' parameter forma
I know this question has a good answer with 't', but thought I would add another solution.
$first = date("Y-m-d", strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month"));