title: Pair all elements of an array in all possible combinations php
body: <p>I've done some searching all i could find is <a href="https://stackoverflow.com/questions/15624662/find-all-possible-unique-combinations-of-elements-of-an-array-in-php">this</a> unfortunately thats not exactly what i'm looking for.</p>
  
  <p>My problem is, i have a list of user ids in an array that could vary in size from 0 to 30+ users.</p>
  
  <p>looks somehting like:</p>
  
  <pre><code>$arr = array(1,2,3);
  </code></pre>
  
  <p>What i need is to be able to find all pairs possible with this users:</p>
  
  <pre><code>(1 - 2)
  (1 - 3)
  
  (2 - 1)
  (2 - 3)
  
  (3 - 1)
  (3 - 2)
  </code></pre>
  
  <p>the idea is to be able to create contact lists on a messaging platform so each one has each other on their contact list.</p>
  
  <p>the examples on the question linked above gives me repeating elements and i can't have repeating elements also don't need 3 elements pared together only 2.</p>