Mysql
 sql >> Database >  >> RDS >> Mysql

Visualizzazione dei dati mysql nella tabella html PHP

Perché stai usando $products?

FIX:

<?php 
foreach ($products as $product) {  //See *$products as $product*, so no need to use $products below instead use $product
    echo "<tr>";
    echo "<td>". $product['productCode']. "</td>";
    echo "<td>". $product['name']. "</td>";
    echo "<td>". $product['version']. "</td>";
    echo "<td>". $product['releaseDate']. "</td>";
    echo "<td><input type = \"submit\" value = \"Delete\" align = \"right\" ></td>";
    echo "</tr>" 
} 
?>