title: Pulling data from database and into an html table
body: <p>I'm pulling data from a database but only getting the first row into the dynamically produced html table.</p>
  
  <p>I've tried adding another foreach loop but that isn't the answer… I'm out of ideas...</p>
  
  <pre><code>$conn = new PDO('mysql:host=localhost;dbname=jeuxvideo', $dbUserName, $dbPassword);
  $sql = "SELECT * FROM jeuxvideo";
  $result = $conn-&gt;prepare($sql);
  $request = $result-&gt;execute();
  
  echo "&lt;table border='1'&gt;";
  echo "&lt;tr&gt;&lt;td&gt;Id&lt;/td&gt;&lt;td&gt;Titre&lt;/td&gt;&lt;td&gt;Prix&lt;td&gt;Date de Sortie&lt;/td&gt;&lt;td&gt;Genre&lt;/td&gt;&lt;td&gt;Origine&lt;/td&gt;&lt;td&gt;Mode&lt;/td&gt;&lt;td&gt;Connexion&lt;/td&gt;&lt;/tr&gt;\n";
  $row = $result-&gt;fetch(PDO::FETCH_ASSOC);
  
  echo "&lt;tr&gt;";
  foreach ($row as $key =&gt; $value) {
  echo "&lt;td&gt;$value&lt;/td&gt;";
  }
  echo "&lt;/tr&gt;";
  echo "&lt;/table&gt;";
  </code></pre>
  
  <p>This code pulls all the correct info and puts it in the right place in the html table, but for some Reason it doesn't collect the Following rows data...</p>