title: PHP - Print all the combinations - product
body: <p>I'm trying to solve a somewhat simple task but can't wrap my head around doing it without a lot of loops and messy code.</p>
  
  <p>I want all to print all combinations of the array below:</p>
  
  <pre><code>$product = array(
      array
      (
          '1X'
      ),
      array
      (
          'X2'
      )
  );
  </code></pre>
  
  <p>producing the following result:</p>
  
  <blockquote>
    <p>//ROW 1<br>
    1<br>
    X</p>
    
    <p>//ROW 2<br>
    X<br>
    2</p>
    
    <p>//ROW 3<br>
    1<br>
    2</p>
    
    <p>//ROW 4<br>
    X<br>
    X</p>
  </blockquote>