<?php $allTeam = [3, 10, 8, 7]; $result = []; foreach ($allTeam as $home) { foreach ($allTeam as $away) { if ($home === $away) { continue; } $result[] = 'Home Team => '.$home.' vs '. $away.' <= Away Team'; } } print_r($result);
You have javascript disabled. You will not be able to edit any code.