function loadProducts() { $products = ProductDAO::getProducts(); echo "<center><h1>.:Productos:.</h1><br>"; echo "<table border=\"3px\">"; foreach ($products as $product) { if ($product->getStock() > 0) { echo "<tr>"; //create row echo "<td>\n\t\t\t\t\t\t\t\t<img src=\"../imagens/" . $product->getImage() . "\" alt=\"product image\" width=\"600px\" height=\"400px\"\\><br>\n\t\t\t\t\t\t\t\t<a href=\"Buy.php?barcode=" . $product->getBarcode() . "&expiration=" . $product->getExpiration() . "\">mostrar informacion</a><br>\n\t\t\t\t\t\t\t\t</td>"; echo "</tr>"; } } echo "</table></center>"; }