home_id) { $result[$type.'_home_made_total'][] = $val_home; $result[$type.'_home_made_home'][] = $val_home; $result[$type.'_home_got_total'][] = $val_away; $result[$type.'_home_got_home'][] = $val_away; } elseif ($away_id == $match->home_id) { $result[$type.'_home_made_total'][] = $val_away; $result[$type.'_home_got_total'][] = $val_away; } elseif ($home_id == $match->away_id) { $result[$type.'_home_made_total'][] = $val_away; $result[$type.'_home_got_total'][] = $val_away; } elseif ($away_id == $match->away_id) { $result[$type.'_home_made_total'][] = $val_home; $result[$type.'_home_made_home'][] = $val_home; $result[$type.'_home_got_total'][] = $val_away; $result[$type.'_home_got_home'][] = $val_home; } if ($away_id == $match->away_id) { $result[$type.'_away_made_total'][] = $val_away; $result[$type.'_away_made_home'][] = $val_away; $result[$type.'_away_got_total'][] = $val_home; $result[$type.'_away_got_home'][] = $val_home; } elseif ($home_id == $match->away_id) { $result[$type.'_away_made_total'][] = $val_home; $result[$type.'_away_got_total'][] = $val_home; } elseif ($away_id == $match->home_id) { $result[$type.'_away_made_total'][] = $val_home; $result[$type.'_away_got_total'][] = $val_home; } elseif ($home_id == $match->home_id) { $result[$type.'_away_made_total'][] = $val_away; $result[$type.'_away_made_home'][] = $val_away; $result[$type.'_away_got_total'][] = $val_home; $result[$type.'_away_got_home'][] = $val_away; } } }