title: How to get all permutaion from a array in php?
body: <p>i have an array </p>
  
  <pre><code>$a = array(1,2,3,4,5);
  </code></pre>
  
  <p>i want to get all combination of <code>$n</code> elements in array</p>
  
  <pre><code>$n = 3
  </code></pre>
  
  <p>output</p>
  
  <pre><code>1 2 3
  1 3 4
  1 4 5
  2 3 5
  2 4 5
  .
  .
  .  
  5 1 2
  </code></pre>