https://secure.php.net/manual/ru/mysqli-result.fetch-assoc. ... c-examples http://htmlbook.ru/html/table https://dev.mysql.com/doc/refman/5.0/en/select.html A select list consisting only of a single unqualified * can be used as shorthand to select all columns from all tables Код (PHP): <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* проверка соединения */ if ($mysqli->connect_errno) { printf("Соединение не удалось: %s\n", $mysqli->connect_error); exit(); } $query = "SELECT * FROM City"; if ($result = $mysqli->query($query)) { echo '<table>'; /* извлечение ассоциативного массива */ while ($row = $result->fetch_assoc()) { echo '<tr><td>'.$row['Name'].'</td><td>'.$row['CountryCode'].'</td></tr>'; } echo '</table>'; /* удаление выборки */ $result->free(); } /* закрытие соединения */ $mysqli->close(); ?>