surveyResponseReport
public static array surveyResponseReport(string token,string SurveyID)
Get the list of Survey Questions with answers and there responses.
- <?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);
- $SurveyID='473';
- $SurveyResponseReport = $client->surveyResponseReport($token,$SurveyID);
-
- foreach($SurveyResponseReport as $rec) {
- echo" Question: " . $rec['question'] ;
- echo "\t Type of Question:" . $rec['questiontype'] ;
- echo "\t Number of Options:" . $rec['questionoptions'] ;
- echo "\t Option1Response:" . $rec['answer1count'] ;
- echo "\t Option2Response:" . $rec['answer2count'] ;
- echo "\t Option3Response:" . $rec['answer3count'] ;
- echo "\t Option4Response:" . $rec['answer4count'] ;
- echo "\t Option5Response:" . $rec['answer5count'] ;
- echo "\t Option6Response:" . $rec['answer6count'] ;
- echo "\t Option7Response:" . $rec['answer7count'] ;
- echo "\t Option8Response:" . $rec['answer8count'] ;
- echo "\t Option9Response:" . $rec['answer9count'] ;
- echo "\t Option10Response:" . $rec['answer10count'] ;
- echo "\t Answer 1:" . $rec['answer1'] ;
- echo "<br />";
- }
-
- ?>