Sorting questionnaire data using PHP and SQL.
I have created a simple multiple choice questionnaire using HTML, PHP and SQL, which when submitted, adds numeric values to a table which each represent specific answers to each of the questions.

For example, I have four questions, and one submitted form may appear in my database cell as '0,1,3,1' (So answered the first option '0' for Question 1, and '1' for Question 2 etc;).

I'm now trying to output that data, and count how many people have selected which answer on each question.

How can I loop over that data in the table and get PHP to increment some kind of array each time so that I eventually have a count of 'This many people answered X for Question X'.

I'm a little confused! Thanks in advanced.
Sorting questionnaire data using PHP and SQL.
===

I have created a simple multiple choice questionnaire using HTML, PHP and SQL, which when submitted, adds numeric values to a table which each represent specific answers to each of the questions.

For example, I have four questions, and one submitted form may appear in my database cell as '0,1,3,1' (So answered the first option '0' for Question 1, and '1' for Question 2 etc;).

I'm now trying to output that data, and count how many people have selected which answer on each question.

How can I loop over that data in the table and get PHP to increment some kind of array each time so that I eventually have a count of 'This many people answered X for Question X'.

I'm a little confused! Thanks in advanced.