<?php
$linhas = array('123|45|1234|101', '999|88|777|666', '123|45|1234|101'); foreach ($linhas as $linha)
$arr[$linha] = NULL; // aqui se removem as linhas duplicadas
echo "*** LINHAS ***\n";
foreach ($arr as $key => $valor) {
echo $key . "\n"; // aqui se comprova o resultado final sem duplicatas
foreach ($partes as $parte) {
$var[$parte] = NULL; // aqui se cria um array que resume todos os nĂºmeros sem duplicatas
}
}
echo "*** CAMPOS ***\n";
foreach ($var as $key => $valor)
echo $key . "\n"; // aqui se comprova o resultado de todos os campos finais sem duplicatas
PD9waHAKJGxpbmhhcyA9IGFycmF5KCcxMjN8NDV8MTIzNHwxMDEnLCAnOTk5fDg4fDc3N3w2NjYnLCAnMTIzfDQ1fDEyMzR8MTAxJyk7CmZvcmVhY2ggKCRsaW5oYXMgYXMgJGxpbmhhKQoJJGFyclskbGluaGFdID0gTlVMTDsgLy8gYXF1aSBzZSByZW1vdmVtIGFzIGxpbmhhcyBkdXBsaWNhZGFzCmVjaG8gIioqKiBMSU5IQVMgKioqXG4iOwpmb3JlYWNoICgkYXJyIGFzICRrZXkgPT4gJHZhbG9yKSB7IAoJZWNobyAka2V5IC4gIlxuIjsgLy8gYXF1aSBzZSBjb21wcm92YSBvIHJlc3VsdGFkbyBmaW5hbCBzZW0gZHVwbGljYXRhcwoJJHBhcnRlcyA9IGV4cGxvZGUgKCd8JywgJGtleSk7Cglmb3JlYWNoICgkcGFydGVzIGFzICRwYXJ0ZSkgewoJCSR2YXJbJHBhcnRlXSA9IE5VTEw7IC8vIGFxdWkgc2UgY3JpYSB1bSBhcnJheSBxdWUgcmVzdW1lIHRvZG9zIG9zIG7Dum1lcm9zIHNlbSBkdXBsaWNhdGFzCgl9Cn0KZWNobyAiKioqIENBTVBPUyAqKipcbiI7CQkKZm9yZWFjaCAoJHZhciBhcyAka2V5ID0+ICR2YWxvcikKCWVjaG8gJGtleSAuICJcbiI7IC8vIGFxdWkgc2UgY29tcHJvdmEgbyByZXN1bHRhZG8gZGUgdG9kb3Mgb3MgY2FtcG9zIGZpbmFpcyBzZW0gZHVwbGljYXRhcwoJCgkKCgoKCQ==