title: While foreach echo's twice?
body: <p>just getting to grips with handling foreach loops. For each row, I am setting 'vine' and 'mp4' in $array however when I echo those values they post twice. Here's my code:</p>
  
  <pre><code>$sql="SELECT vine_id,mp4_url FROM videos LIMIT 1";
  
  $res=mysql_query($sql);
  
  while($row=mysql_fetch_assoc($res)){
      foreach ($row as $array) {
          $array=array(
              "vine"=&gt;$row['vine_id'],
              "mp4"=&gt;$row['mp4_url']);
              echo $array["vine"];
              echo $array["mp4"];
       }
  }
  </code></pre>
  
  <p>Here's my output:</p>
  
  <pre><code>bUjdjmFHt5I //vine
  https://vines.s3.amazonaws.com/v/videos/2013/04/20/A42066A1-EC83-4211-BA20-DAD287C8AF1E-362-0000002797BBAC52_1.0.7.mp4?versionId=oMGICGs2c7dCbodVIHHiaQ1MhqKg65.y //mp4
  
  bUjdjmFHt5I //vine
  https://vines.s3.amazonaws.com/v/videos/2013/04/20/A42066A1-EC83-4211-BA20-DAD287C8AF1E-362-0000002797BBAC52_1.0.7.mp4?versionId=oMGICGs2c7dCbodVIHHiaQ1MhqKg65.y //mp4
  </code></pre>
  
  <p>Am I missing something in my code that's making this post twice?</p>