When selecting data from a database, how would I put it into a HTML table with a PHP PDO connection?
03:26 24 Mar 2026

As of right now, all I have is this:

query("SELECT id, name, email FROM users");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>

This is selecting the data and stores it in $rows but I'd like to display it in a HTML table row by row.

php html mysql pdo