$e = "fill"; break; case 2: $e = "empty"; break; case 3: $e = "pour"; break; } switch ($f) { case 1: $f = "A"; break; case 2: $f = "B"; break; case 3: $f = "C"; break; } if ($markRedundant && $e != "pour") { $f = "({$f})"; $g = "({$g})"; } echo "|\t{$a}\t|\t{$b}\t|\t{$c}\t|\t{$d}\t|\t{$e}\t|\t{$f}\t|\t{$g}\t|\n"; } } $content = file_get_contents($argv[1]); $content = explode("\n", $content); tabelize(fill(organize(clean($content))), $argv[2]);
} } } else { $case[$match][$diff] = array(intval($fields[F_ORDER_ID])); } } function getDealIdAndEmail(&$fields) { return md5($fields[F_DEAL_ID] . '+' . $fields[F_EMAIL]); } function getDealIdAndAddress(&$fields) { return md5($fields[F_DEAL_ID] . '+' . $fields[F_ADDR_STREET] . '+' . $fields[F_ADDR_CITY] . '+' . $fields[F_ADDR_STATE] . '+' . $fields[F_ADDR_ZIP]); } function getCcn(&$fields) { return $fields[F_CCN]; } $n = readline(''); $case1 = array(); $case2 = array(); $fraudulentDeals = array(); for (; $n; --$n) { $fields = array_map('trim', explode(',', strtolower(readline('')))); normalize($fields); organize($fraudulentDeals, $case1, $fields, 'getDealIdAndEmail', 'getCcn'); organize($fraudulentDeals, $case2, $fields, 'getDealIdAndAddress', 'getCcn'); } $k = array_keys($fraudulentDeals); sort($k); print implode(',', $k) . "\n";