$query = mysql_query("SELECT COUNT(MONTH(campofecha)) AS total_meses,MONTH(campofecha) AS mes FROM tabla"); $sql = mysql_fetch_assoc($query); echo $sql['mes']." : ".$sql['total_meses'];