public function displayMember()
{
$statement=$this->db->query("SELECT user_name,user_email,user_gender,date_of_join,user_firstname FROM tbl_users");
while($row=$statement->fetch(PDO::FETCH_ASSOC))
This is from a class file. How we can return the associative array in the page where we display our values where we call the displayMember() method. What I need is to print the data not inside this function but to pass it and print it on the page I call this function inside a table.