title: Foreach loop are displaying same rows multiple times
body: <p>I have a problem with my first attempt at making a foreach loop. </p>
  
  <p>My problem is, that I'm only trying to call out two rows to be displayed, which kinda works, although they are being displayed as many times as there are different rows in my table.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>$sql = "SELECT * FROM webpages";
  $result = mysql_query($sql);
  $assoc_query = mysql_fetch_assoc($result);
  
  &lt;?php foreach ($assoc_query as $value) { ?&gt;
  &lt;tr&gt;
     &lt;td&gt;
       &lt;div id='pageimg'&gt;&lt;img src= &lt;?php echo $assoc_query['pic'];?&gt;  &gt;&lt;/div&gt;
     &lt;/td&gt;
     &lt;td&gt;
       &lt;div id="pagename"&gt;&lt;?php echo $assoc_query['name']; ?&gt; &lt;/div&gt;
     &lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>It's being displayed like so on the page: </p>
  
  <pre><code>/picture/ DAK
  /picture/ DAK
  /picture/ DAK
  /picture/ DAK
  </code></pre>
  
  <p>Hope you can help me:)</p>