public function education() { $userid = self::get_user(); $education = new Education($userid); $educdata = $education->currenteducation(); $currenteduc = $education->currenteducdata(); $this->curreducation = $currenteduc->fetch_object(); while ($rowedu = $educdata->fetch_object()) { $this->educationdata[] = $rowedu; } }