Wpdb get->results to out the the month from the db
You could use the MONTHNAME(dato) on your select Like $rows = $wpdb->get_results( “SELECT MONTHNAME(dato) as month_name, avg(fiske_vaegt) as fiske_vaegt FROM `wp_registreringer` WHERE MONTH(dato) = 11 AND YEAR(dato) = 2017;”); and access it like this echo $row->month_name