xxxxxxxxxx
foreach($_POST['an_array'] as $key => $an_array) {
$another_array = $_POST['another_array'][$key];
//do whatevercrap you wanna do
}
xxxxxxxxxx
$teams = [
'Team A' => ['John', 'Sarah'],
'Team B' => ['Mike', 'Emily'],
];
foreach ($teams as $team => $members) {
echo "Team $team: ";
foreach ($members as $member) {
echo "$member, ";
}
echo "\n";
}