title: Function is expecting arrays but I want to pass a variable
body: <p>I have a PHP function that is expecting an unknown number of arrays as parameters.</p>
  
  <pre><code>function cartesianProduct() { ... }
  </code></pre>
  
  <p>It is expecting me to do something like this:</p>
  
  <pre><code>cartesianProduct(
    array('blue', 'green', 'red'),
    array('apples', 'oranges', 'bananas')  
  );
  </code></pre>
  
  <p>But I'm constructing the arrays beforehand and am having trouble passing them in.<br>
  For example:</p>
  
  <pre><code>$arrs = array(
    array('blue', 'green', 'red'),
    array('apples', 'oranges', 'bananas')
  );
  cartesianProduct($arrs);
  </code></pre>
  
  <p>Passing in the arrays this way doesn't work - obviously it is seeing it as one single array parameter.</p>
  
  <p>How can I 'expand' my <code>$arrs</code> parameter or call the function in a different way to make the function think I'm passing the inner arrays?</p>
  
  <p>Thanks</p>