surveyGetQuestionList
public static array surveyGetQuestionList(string token,string SurveyID)
Get the list of Survey Questions.
Section
Survey Related Methods

Parameters

Returns


Examples
download example code
xmlrpc_surveyGetQuestionList.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10. $SurveyQuestionLists = $client->surveyGetQuestionList($token, "", "", 1, 100, "", "");
  11.  
  12. foreach($SurveyQuestionLists as $rec) {
  13.     echo" Survey Question: " . $rec['question'] . "(" . $rec['questionid'] . ")";
  14.     echo "\t Number of options for the question:" . $rec['questionoptions'] ;
  15.     echo "\t Type ot Answer:" . $rec['questiontype'] ;
  16.     echo "\t Option 1:" . $rec['answer1'] ;
  17.     echo "\t Option 2:" . $rec['answer2'] ;
  18.     echo "\t Option 3:" . $rec['answer3'] ;
  19.     echo "\t Option 4:" . $rec['answer4'] ;
  20.     echo "\t Option 5:" . $rec['answer5'] ;
  21.     echo "\t Created Date: " . $rec['createdDate'] ;
  22.     echo "\t Updated Date: " . $rec['modifiedDate'];
  23.     echo "<br />";
  24. }
  25.  
  26. ?>