ID; endif; $data = sportspress_get_player_statistics_data( $id, $league->term_id ); // The first row should be column labels $labels = $data[0]; // Remove the first row to leave us with the actual data unset( $data[0] ); $output = '' . '' . '' . ''; foreach( $labels as $key => $label ): $output .= ''; endforeach; $output .= '' . '' . ''; $i = 0; foreach( $data as $season_id => $row ): $output .= ''; foreach( $labels as $key => $value ): $output .= ''; endforeach; $output .= ''; $i++; endforeach; $output .= '' . '
' . $league->name . '
' . $label . '
' . sportspress_array_value( $row, $key, '—' ) . '
'; return apply_filters( 'sportspress_player_league_statistics', $output ); } }