title: Using PHP, randomly pair up group of items, not pairing any with itself, no direct pairings
body: <p>Assume you have a set of items in an array.</p>
  
  <p>A, B, C, D, E, F, G, H</p>
  
  <p>Using PHP, how would you randomly pair the letters together without pairing them with a duplicate of themselves?</p>
  
  <p>Such as this:</p>
  
  <pre><code> A-&gt;pairedLetter = G
   B-&gt;pairedLetter = C
   C-&gt;pairedLetter = E
   D-&gt;pairedLetter = A
   E-&gt;pairedLetter = B
   F-&gt;pairedLetter = D
   G-&gt;pairedLetter = F
  </code></pre>
  
  <p>and so on...</p>
  
  <p>EDIT:
  Oh, and also, If A is paired with F, F can NOT be paired with A.
  So there will have to be as many relationships as there are items.</p>