title: Display mysql data in a new div per row returned
body: <p>I have created the following however it is not displaying the data correctly, I wish for a new div per line of data from the database.</p>
  
  <pre><code>&lt;?php
  include_once '\inc\header.php';
  
  $db_server = mysql_connect($db_hostname, $db_username, $db_password);
  
  if (!$db_server) die("Unable to connect to MySQL: ". mysql_error());
  
  mysql_select_db($db_database)
  or die ("Unable to select database: " . mysql_error());
  
  $query = "select * from deal";
  $result = mysql_query($query);
  
  if (!$result) die ("Database access failed: " . mysql_error());
  ?&gt;
  
  &lt;body class="metrouicss" onload="prettyPrint()" style="zoom: 1;"&gt;
  &lt;div id="container"&gt;
  
  &lt;?php
  foreach($result as $tile)
      {?&gt;
          &lt;div class="item tile double bg-color-red"&gt;
                  &lt;?php echo $tile['name']?&gt;
          &lt;/div&gt;
      &lt;?php }?&gt;
  &lt;/div&gt;
  
  
  &lt;?php 
  mysql_close ($db_server);
  ?&gt;
  </code></pre>
  
  <p>`</p>