Are you looking for this?
SELECT comp,
GROUP_CONCAT(CONCAT(TeamA, '|', TeamB)) details
FROM table1
GROUP BY comp
Output:
+--------------------------------------+--------------------------------------------+
| comp | details |
+--------------------------------------+--------------------------------------------+
| Africa World Cup - Qual | Kenya|Namibia,Zimbabwe|Mozambique |
| England - League One | Coventry City|Colchester Utd |
| League Of Ireland - Premier Division | Bray Wanderers|UCD,Dundalk|Drogheda United |
+--------------------------------------+--------------------------------------------+
Here is SQLFiddle demo
If needed you can change delimiters both in CONCAT() and GROUP_CONCAT() from comma , and pipe | respectively.
You can easily explode() details values while iterating over the result set.
Simplified php part using PDO might look like this
$db = new PDO('mysql:host=localhost;dbname=test', 'user', 'userpwd');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$sql = "SELECT comp,
GROUP_CONCAT(CONCAT(TeamA, '|', TeamB)) details
FROM table1
GROUP BY comp";
$query = $db->prepare($sql);
$query->execute();
$rows = $query->fetchall(PDO::FETCH_ASSOC);
$query = null;
$db = null;
foreach($rows as $row) {
echo $row['comp'] . '</br>';
$details = explode(',', $row['details']);
foreach($details as $detail) {
list($teama, $teamb) = explode('|', $detail);
echo $teama . ' - ' .$teamb . '</br>';
}
echo '</br>';
}
Output:
Africa World Cup - Qual
Kenya - Namibia
Zimbabwe - Mozambique
England - League One
Coventry City - Colchester Utd
League Of Ireland - Premier Division
Bray Wanderers - UCD
Dundalk - Drogheda United