get("Survey", array("uid" => $_POST['objectUid'])); if (!empty($surveyResults)) { (is_array($surveyResults)) ? $this->loadedSurvey = $surveyResults[0] : $this->loadedSurvey = $surveyResults; } else { die("No surveys found!"); } } else { die("Incorrect or null uid passed!"); } } public function init() { $questionString = ""; foreach ($this->loadedSurvey->questions as $question) { $questionString .= $question->uid . ","; } // echo the HTML markup to display the editor on the screen ?>