function Page($page, $username = "") { $this->db = Database::getInstance(); $array = $this->db->getPage($page, $username); $this->name = $array["name"]; $this->title = $array["title"]; $this->rows = $array["rows"]; if (empty($this->rows)) { $username = preg_replace("/(.+) \\-.*/", "\$1", $this->title); $this->title = "The name '{$username}' does not exist in the database."; } }