I'm getting Notice: Trying to get property of non-object in
when I'm trying to
foreach ($query->fetch(PDO::FETCH_OBJ) as $row) {
echo $row->id_users;
echo $row->username;
echo $row->password;
echo $row->email;
}
When I use print_r($query->fetch(PDO::FETCH_OBJ))
i'm getting
Class Object ( [id_users] => 1 [username] => test [password] => test [email] => test )