I want to fetch all the rows of a table but it only echos 1 row. (The latest) Tried much but nothing worked for me. Tried answers on stackoverflow but it is not working.
Here is the code that i use to fetch the rows:
$stmt = $pdo->prepare("SELECT * FROM admin");
$stmt->execute();
$result = $stmt->fetchAll();
foreach ($result as $row) {
$gebruikersnaam = $row['gebruikersnaam'];
$wachtwoord = $row['wachtwoord'];
}
Hope that anyone can help me with this.