Page 1 of 1

printing and formatting database info

Posted: Wed Nov 25, 2009 12:03 pm
by milbra
I have a DB with user responses for 6 questions.

Basically, the 1st 4 want the user to rank suggested answers from 1 to 4 then give a comment for each. The other 2 are just user comments.

(1 - 4 are something like this...)
1. Which is your favorite color?
__ blue __ red __ green __ yellow

________________________________ (comments)


I counted the #s given for each question in my WHILE loop
WHILE ( $row = mysql_fetch_array($results) )

I want to print the results for question 1 along with its comment followed by question 2 then 3...
I want to print in a table looking something like this...

Question 1

blue 2 1 5 0
red 1 4 3 1
green 3 6 0 2
yellow 0 2 3 4

Comments:
(list all comments for that question)


Question 2...
Question 3...
Question 4...
Question 5 (list all comments)
Question 6 (list all comments)

Formatting isn't a problem. Keeping all the comments and being able to print them in the right location is. Hope I explained it well enough.

How can I do this?