title: insert masonry in php from images that were retreieved from a mysql database
body: <p>I would like to insert masonry into a php form that retrieves images from a MySQL database. I can retrieve the images, but when I try to put in masonry, the whole thing doesn't work at all. </p>
  
  <p>Here is my code
      
  
  <pre><code>$result = mysqli_query($con,"SELECT * FROM img");
  
  while($row = mysqli_fetch_array($result)) {
    echo "&lt;script src="/path/to/masonry.pkgd.min.js"&gt;&lt;/script&gt;"
    echo "&lt;div id="container"&gt;"
    echo "&lt;img class='item' src='" . $row['path'] . "' /&gt;";
    echo "&lt;/div&gt;"
  }
  
  mysqli_close($con);
  ?&gt; 
  </code></pre>