Comparing multiple arrays
<p>I'm trying to figure out how to write a tie-breaker function. The following records are all tied for one reason or another, so to break the tie, we sort each result and then go through each line. The tie is broken at the first point there is a difference.</p>

<p>In the example below on the first pass $result[c] is eliminated, but a and b are still tied. Then on the second pass a is eliminated because it is greater than b. So the result is b, a, c</p>

<pre><code>$result[a] = array(1, 3, 4, 5);
$result[b] = array(1, 2, 3, 7);
$result[c] = array(2, 3, 3, 5);
</code></pre>

<p>And to make it even more complicated, I won't always have the same number of results to compare. It could be anything more than 2.</p>

<p>I really hope this makes sense.</p>
