$sql = "SELECt * FROM MY_TABLE";$result = mysqli_query($conn, $sql); // First parameter is just return of "mysqli_connect()" functionecho "<br>";echo "<table border='1'>";while ($row = mysqli_fetch_assoc($result)) { // important line !!! Check summary get row on array .. echo "<tr>"; foreach ($row as $field => $value) { // I you want you can right this line like this: foreach($row as $value) { echo "<td>" . $value . "</td>"; // I just did not use "htmlspecialchars()" function. } echo "</tr>";}echo "</table>";