surveyGetQuestionList
public static array surveyGetQuestionList(string token,string SurveyID)
Get the list of Survey Questions.
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
- $SurveyQuestionLists = $client->surveyGetQuestionList($token, "", "", 1, 100, "", "");
-
- foreach($SurveyQuestionLists as $rec) {
- echo" Survey Question: " . $rec['question'] . "(" . $rec['questionid'] . ")";
- echo "\t Number of options for the question:" . $rec['questionoptions'] ;
- echo "\t Type ot Answer:" . $rec['questiontype'] ;
- echo "\t Option 1:" . $rec['answer1'] ;
- echo "\t Option 2:" . $rec['answer2'] ;
- echo "\t Option 3:" . $rec['answer3'] ;
- echo "\t Option 4:" . $rec['answer4'] ;
- echo "\t Option 5:" . $rec['answer5'] ;
- echo "\t Created Date: " . $rec['createdDate'] ;
- echo "\t Updated Date: " . $rec['modifiedDate'];
- echo "<br />";
- }
-
- ?>