I'm try to display a result of a select query, but i only get duplicate first row not all the rows. here is my code :
$query = "SELECT Email from client";
$result = $db->query($query)->fetch();
foreach($result as $email){
echo $email["Email"]."\n";
}
Connexion to database works fine.
fetch()once.fetch(). php.net/manual/en/mysqli-stmt.fetch.php and php.net/manual/en/pdostatement.fetch.php