ID = $id; $result = Database::select('articlecomments', '*', 'WHERE id = :id', data: [':id' => $id]); $ArticleInfo = $result->fetch(); $this->Author = $ArticleInfo['commentAuthor']; $this->Content = $ArticleInfo['commentContent']; $this->PostDate = betterDate($ArticleInfo['commentDate']); $this->ArticleID = $ArticleInfo['articleID']; } public function __get($what) { return property_exists($this, $what) ? $this->{$what} : null; } }