i guys, I have 4 arrays which contain a key and value for each, the array name does not matter:
$ticket1 = ('departure' => 'Lime St', 'arrival' => 'Manchester');
$ticket2 = ('departure' => 'Manchester', 'arrival' => 'London');
$ticket3 = ('departure' => 'London', 'arrival' => 'Southampton');
$ticket4 = ('departure' => 'Southampton', 'arrival' => 'Dover');
You are given these tickets in any order. As Lime St & Dover are only used once they are the start & end of the journey.
Any help greatly appreciated, spend around 4 hours going through the numerous array functions on php.net, didn't get anywhere 🙁