title: Get all permutations from multiple arrays PHP
body: <p>I have the following array</p>
  
  <pre><code>Array
  (
     ['colour'] =&gt; Array
         (
               [0] =&gt; 1130
               [1] =&gt; 1131
               [2] =&gt; 1132
               [3] =&gt; 1133
         )
  
     ['size'] =&gt; Array
         (
               [0] =&gt; 1069
               [1] =&gt; 1070
         )
     //there could also be further arrays here such as weight etc
  </code></pre>
  
  <p>)</p>
  
  <p>I want to get all the possible permutations - such as</p>
  
  <pre><code> Colour 1130 - Size 1069
   Colour 1130 - Size 1070
   Colour 1131 - Size 1069
   Colour 1131 - Size 1070
   Colour 1132 - Size 1069
   etc
  </code></pre>
  
  <p>But obviously don't want to have permutations that contain more than 1 of each type (an item cannot be both blue and red or both large and medium)</p>
  
  <p>note, that the keys are all numeric, I changed them here to colour, size to make it clearer (hopefully!) </p>