Raw Data for $recipient_name"; $num_questions = count_questions(); // get all question texts out of the database $question_texts = get_question_texts(); //Returns an array in the form array[respondent_id][question_number] = score $scores = get_scores($recipient_id, $num_questions); //var_dump($scores); $num_respondents = get_num_respondents($recipient_id); //echo "num_respondents = $num_respondents
"; $respondent_names = get_respondent_names($recipient_id); $respondent_ids = get_respondent_ids($recipient_id); echo" "; // generate names of respondents to put in cells on this first row for ($i=0; $i<$num_respondents; $i++){ $respondent_id = $respondent_ids[$i]; echo " "; } echo" "; for ($i=1; $i<=$num_questions; $i++){ $q_text = $question_texts[$i]; echo" "; for ($j=0; $j<$num_respondents; $j++){ $respondent_id = $respondent_ids[$j]; $score = $scores[$respondent_id][$i]; if ($score == ""){ $score = "NULL"; } echo" "; } echo" "; }//end of looping through questions echo"
$respondent_names[$i]
$i. $q_text$score
"; show_raw_data_footer(); ?>