surveyResponseReport
public static array surveyResponseReport(string token,string SurveyID)
Get the list of Survey Questions with answers and there responses.
Section
Survey Related Methods

Parameters

Returns


Examples
download example code
xmlrpc_surveyResponseReport.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. $SurveyID='473';
  11. $SurveyResponseReport = $client->surveyResponseReport($token,$SurveyID);
  12.  
  13. foreach($SurveyResponseReport as $rec) {
  14.     echo" Question: " . $rec['question'] ;
  15.     echo "\t Type of Question:" . $rec['questiontype'] ;
  16.     echo "\t Number of Options:" . $rec['questionoptions'] ;
  17.     echo "\t Option1Response:" . $rec['answer1count'] ;
  18.     echo "\t Option2Response:" . $rec['answer2count'] ;
  19.     echo "\t Option3Response:" . $rec['answer3count'] ;
  20.     echo "\t Option4Response:" . $rec['answer4count'] ;
  21.     echo "\t Option5Response:" . $rec['answer5count'] ;
  22.     echo "\t Option6Response:" . $rec['answer6count'] ;
  23.     echo "\t Option7Response:" . $rec['answer7count'] ;
  24.     echo "\t Option8Response:" . $rec['answer8count'] ;
  25.     echo "\t Option9Response:" . $rec['answer9count'] ;
  26.     echo "\t Option10Response:" . $rec['answer10count'] ;
  27.     echo "\t Answer 1:" . $rec['answer1'] ;
  28.     echo "<br />";
  29. }
  30.  
  31. ?>