Subtract 30 days from a date

$today= date("Y-m-d");

$startdate=date('Y-m-d',(strtotime ( '-30 day' , strtotime ($today) ) ));