title: Explode and then merge arrays
body: <p>I have two strings, one containing names separated by commas and the other containing email addresses separated by commas.</p>
  
  <p>I now want my end result to replicate the behaviour as if I had gotten those values from the database with a:</p>
  
  <pre><code>while ($row = $query-&gt;fetch(PDO::FETCH_ASSOC)) {
      echo $row['name'].'&lt;br /&gt;'.$row['email'];
  }
  </code></pre>
  
  <p>So I have for example these strings:</p>
  
  <pre><code>email1@domain.com,email2@domain.com,email3@domain.com
  </code></pre>
  
  <p>and</p>
  
  <pre><code>name1,name2,name3
  </code></pre>
  
  <p>And can then explode these into value arrays. Now, after exploding them,
  I want to be able to make a loop where in each loop I can get <code>$name[0]</code> and <code>$email[0]</code> together, and <code>$name[1]</code> and <code>$email[1]</code> together,  etc.</p>
  
  <p>How can I merge the two arrays (after exploding them) and get the data for each datapair (name and email) in a loop?</p>