PHP / PDO echo data from database into a table
Ok so I have figured it out <?php $getUser = $db->prepare(“SELECT * FROM users”); $getUser->execute(); $users = $getUsers->fetchAll(); <table> <tr> <th>Username</th> <th>Password</th> </tr> <?php foreach ($users as $user) { ?> <tr> <td><?php echo $users[‘username’] ?></td> <td><?php echo $users[‘password’] ?></td> </tr> <?php } ?> </table> It now echo’s every username and password inside the table. even … Read more