I create as the following function. how to get all data using this array. when run this function will appear only the first record. but, i want it to appear all the records. what is the error in this code.
public function get_All_Se($stId){
    $query = "SELECT * FROM session WHERE stId = '$stId'";
    $result = $this->db->query($query) or die($this->db->error);
    $data = $result->fetch_array(MYSQLI_ASSOC);     
return $data;
}
 
     
     
     
     
    