Menu icon Foundation
How To Display Data From MYSQL into Foundation with even rows & columns?

Hi there I am attempting to use the store template as follow:
https://www.notableapp.com/posts/4e13e639fbf4ac815dd106de6caa02e949b81bb0#annotate
to display data from mysql data base since am new to Foundation, I can't seem to figure out how best to achieve this.
My code is as follow:

<div class="row">
 <div class="large-12 columns">
   <ul class="large-block-grid-3">
<?php 
require_once ('inc/config.php'); 
$dynamicList = "";
$sql = "SELECT * FROM products ORDER BY date_added DESC LIMIT  6";
mysql_select_db($groceryhustler, $conndb);
$result= mysql_query($sql, $conndb) or die (mysql_error());
$productCount = mysql_num_rows($result); // count the output amount
if ($productCount > 0) { 
     while($row = mysql_fetch_array($result)){   
              $records[] = array(1 => $row['']);
              $id = $row["id"];

              $product_name = $row["product_name"];
        $price = $row["price"];
        $date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
              $dynamicList.= '<li><a href="product.php?id=' . $id . '"><img src="inventory_images/' . $id . '.jpg" alt="' . $product_name . '"></a>
             <h4>' . $product_name . '</h4>
             <h4 class="subheader">$' . $price . '</h4>
             </li>';           
             
          }
} else {
   $dynamicList = "We have no products listed in our store yet";
}
mysql_close();
?>
    </ul>                                           
 </div>
</div>
     
 
 <?php echo $dynamicList; ?>
</body>
</html>
            

         

The Result am getting is as follow:
http://groceryhustler.com/niche.php

mysqldatawhile looprowcolumn

Hi there I am attempting to use the store template as follow:
https://www.notableapp.com/posts/4e13e639fbf4ac815dd106de6caa02e949b81bb0#annotate
to display data from mysql data base since am new to Foundation, I can't seem to figure out how best to achieve this.
My code is as follow:

<div class="row">
 <div class="large-12 columns">
   <ul class="large-block-grid-3">
<?php 
require_once ('inc/config.php'); 
$dynamicList = "";
$sql = "SELECT * FROM products ORDER BY date_added DESC LIMIT  6";
mysql_select_db($groceryhustler, $conndb);
$result= mysql_query($sql, $conndb) or die (mysql_error());
$productCount = mysql_num_rows($result); // count the output amount
if ($productCount > 0) { 
     while($row = mysql_fetch_array($result)){   
              $records[] = array(1 => $row['']);
              $id = $row["id"];

              $product_name = $row["product_name"];
        $price = $row["price"];
        $date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
              $dynamicList.= '<li><a href="product.php?id=' . $id . '"><img src="inventory_images/' . $id . '.jpg" alt="' . $product_name . '"></a>
             <h4>' . $product_name . '</h4>
             <h4 class="subheader">$' . $price . '</h4>
             </li>';           
             
          }
} else {
   $dynamicList = "We have no products listed in our store yet";
}
mysql_close();
?>
    </ul>                                           
 </div>
</div>
     
 
 <?php echo $dynamicList; ?>
</body>
</html>
            

         

The Result am getting is as follow:
http://groceryhustler.com/niche.php