How can i acces the $pos var outside a class? so i can use it in my index like: echo $pos i also icluded this class in my index.
public function CheckProfile(){
$get = $this->db->query("SELECT positive, posts FROM users WHERE user='". $_SESSION['user'] ."'");
while($row = $get->fetch(PDO::FETCH_ASSOC))
{
return $pos = $row['post'];
}
}