I am having some trouble getting some values from my sql query in php
This is my php code:
<?php
include "init.php";
$stmt = "SELECT email FROM Customer ";
$result = $dbcon -> prepare($stmt);
$result->execute();
$result->store_result();
while($result -> fetch()){
// This line below works
echo "Works";
// This doesn't work
echo $result['email'];
}
?>