Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db = new mysqli($host, $user, $pass, $dbname);
- $res = $db->query("SELECT * FROM table_name");
- ?>
- <table>
- <tbody>
- <?php while ($row = $res->fetch_assoc()): ?>
- <tr>
- <? foreach ($row as $val):?>
- <td><?=$val ?></td>
- <? endforeach; ?>
- </tr>
- <? endwhile; ?>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement