title: While loop in While loop with an inner join
body: <p>For a little project I'm making a bookmark system.</p>
  
  <p>On the front page I want to show all the available categories, and under each category the links within the category.</p>
  
  <p>At the moment I'm stuck with this:</p>
  
  <pre><code>$querylinks = "SELECT * FROM links INNER JOIN categorien ON links.categorie_id=categorie.categorie_id; "; 
  $results = mysql_query($querylinks);
  
  while ($row = mysql_fetch_array('$results')) {
      echo $row['categorie.categorie_id'];
      while ($row = mysql_fetch_array($results)) {/*the links within the category*/
          echo "&lt;a href=" . "http://" . $row['link.link_url'] . "&gt;"
               . $row['link.link_naam'] . "&lt;/a&gt;&lt;br /&gt;";
      }
  }
  </code></pre>
  
  <p>The tables "links" and "categories" are joined in the hope that it will get the links within the given category.</p>
  
  <p>I hope I'm not doing something too stupid here, still starting with php.
  Do you have an idea why this won't work? I searched throughout stackoverflow but couldn't find something similar.</p>