title: Catchable fatal error: Object of class mysqli_result could not be converted to string in /home/u655787642/public_html/index.php on line 40
body: <p>I've done some research into this but simply cannot figure out how to do this.</p>
  <pre><code>$sql = &quot;SELECT * FROM teams&quot;;
  $result = $conn-&gt;query($sql); 
  </code></pre>
  <p>This is what I use to retrieve the data from the database, and I read I should use fetch to make it work.</p>
  <p>I'd like to insert the retrieved data into a table with this code:</p>
  <pre><code>&lt;?php foreach($result as $tr) { ?&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;?=$tr['t_Naam']?&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php } ?&gt;
  </code></pre>