PHP:
$f_date = 'Y-m-d';$my_date = new DateTime();$my_date->modify('first day of '.date('F Y'));echo $my_date->format($f_date);echo "<br>";$my_date->modify('last day of '.date('F Y'));echo $my_date->format($f_date);
MySQL:
selectDATE_FORMAT(now(),'%Y-%m-01') AS 'primer_dia_del_mes',LAST_DAY(DATE_FORMAT(now(),'%Y-%m-01')) AS 'ultimo_dia_del_mes'