<?php
$a_controle = Array('A','B','C','D','E','F'); );
foreach ($array_final as $sub_array_final){
for ($i = 0; $i < count($sub_array_final); ++$i){ for ($j = 0; $j < count($sub_array_final); ++$j){ $elem1 = $sub_array_final[$i];
$elem2 = $sub_array_final[$j];
if ($i != $j){
if (isset($apareceu_com[$elem1][$elem2])){ $apareceu_com[$elem1][$elem2]++;
}
else {
$apareceu_com[$elem1][$elem2] = 1;
}
}
}
}
}
PD9waHAKJGFfY29udHJvbGUgPSBBcnJheSgnQScsJ0InLCdDJywnRCcsJ0UnLCdGJyk7CiRhcnJheV9maW5hbCA9IEFycmF5KAogICAgQXJyYXkoIkEiLCJCIiwiQyIpLAogICAgQXJyYXkoIkEiLCJCIiwiRCIpLAogICAgQXJyYXkoIkEiLCJDIiwiRSIpLAogICAgQXJyYXkoIkQiLCJFIiwiRiIpLAogICAgQXJyYXkoIkEiLCJCIiwiUCIpCik7IAoKJGFwYXJlY2V1X2NvbSA9IEFycmF5KCk7Cgpmb3JlYWNoICgkYXJyYXlfZmluYWwgYXMgJHN1Yl9hcnJheV9maW5hbCl7CiAgICBmb3IgKCRpID0gMDsgJGkgPCBjb3VudCgkc3ViX2FycmF5X2ZpbmFsKTsgKyskaSl7CiAgICAgICAgZm9yICgkaiA9IDA7ICRqIDwgY291bnQoJHN1Yl9hcnJheV9maW5hbCk7ICsrJGopewogICAgICAgICAgICAkZWxlbTEgPSAkc3ViX2FycmF5X2ZpbmFsWyRpXTsKICAgICAgICAgICAgJGVsZW0yID0gJHN1Yl9hcnJheV9maW5hbFskal07CiAgICAgICAgICAgIAogICAgICAgICAgICBpZiAoJGkgIT0gJGopewogICAgICAgICAgICAgICAgaWYgKGlzc2V0KCRhcGFyZWNldV9jb21bJGVsZW0xXVskZWxlbTJdKSl7CiAgICAgICAgICAgICAgICAgICAgJGFwYXJlY2V1X2NvbVskZWxlbTFdWyRlbGVtMl0rKzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICRhcGFyZWNldV9jb21bJGVsZW0xXVskZWxlbTJdID0gMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KfQoKcHJpbnRfcigkYXBhcmVjZXVfY29tKTs=