Say i start with a simple array (which could be theoretically of any length):
$ids = array(1,2,3,4);
What it the best solution for splitting this array into an array of unique pairs like:
$pair[0] = array(1,2);
$pair[1] = array(1,3);
$pair[2] = array(1,4);
$pair[3] = array(2,3);
$pair[4] = array(2,4);
$pair[5] = array(3,4);