$timestamp = strtotime('October');
        //也可以这么写$timestamp = strtotime('2012-02');
    $days = date('t',$timestamp);
    echo $days; //31