title: Exploding Arrays in PHP While Keeping the Original Key
body: <p>How can I do the following without lots of complicated code?</p>
  
  <ol>
  <li>Explode each value of an array in PHP (I sort of know how to do this step)</li>
  <li>Discard the first part</li>
  <li>Keep the original key for the second part (I know there will be only two parts)</li>
  </ol>
  
  <p>By this, I mean the following:</p>
  
  <pre><code>$array[1]=blue,green
  $array[2]=yellow,red
  </code></pre>
  
  <p>becomes</p>
  
  <pre><code>$array[1]=green //it exploded [1] into blue and green and discarded blue
  $array[2]=red // it exploded [2] into yellow and red and discarded yellow
  </code></pre>
  
  <p>I just realized, could I do this with a for...each loop? If so, just reply yes. I can code it once I know where to start.</p>