ID; endif; $teams = (array)get_post_meta( $id, 'sp_team', false ); $results = sportspress_array_combine( $teams, (array)get_post_meta( $id, 'sp_results', true ) ); $result_labels = sportspress_get_var_labels( 'sp_result' ); $output = ''; // Initialize and check $table_rows = ''; $i = 0; foreach( $results as $team_id => $result ): if ( sportspress_array_value( $result, 'outcome', '-1' ) != '-1' ): unset( $result['outcome'] ); $table_rows .= '
| ' . __( 'Team', 'sportspress' ) . ' | '; foreach( $result_labels as $key => $label ): $output .= '' . $label . ' | '; endforeach; $output .= '' . '' . ''; $output .= $table_rows; $output .= '
|---|