title: Manipulating multiple arrays to output a table of unique values
body: <p>I have 5 different arrays which I need to use to generate a table showing the info. This table cannot have duplicates. This is in a way a fairly easy task, but what I am looking for is the most elegant solution - one that doesn't require lots of for loops, array merging etc etc. </p>
  
  <p>The table needs to output information for photo printing. And should look a bit like this:</p>
  
  <p><img src="https://i.stack.imgur.com/nYRrp.jpg" alt="Example output"></p>
  
  <p>Not like this:</p>
  
  <p><img src="https://i.stack.imgur.com/EugNB.jpg" alt="enter image description here"></p>
  
  <p>The arrays look like this: </p>
  
  <pre><code>//img arr:
          $img_arr = array(array('002_chrysanthemum', '6x4'), array('002_chrysanthemum', '9x6'));
  
  //size arr:
      $size_arr = array('6x4', '9x6');
  
  //finish arr:
      $finish_arr = array('glossy', 'glossy');
  
  //qty arr:
      $qty_arr = array(2, 3);
  
  //media arr:
      $media_arr = array('std', 'std');
  </code></pre>
  
  <p>Thanks.</p>
  
  <p><em>EDIT</em> - Typo with finish / qty arr pointed out, changed, thanks. </p>