I am trying to create a polling system where if the user goes on a question, that question is logged in the table's question_arr column. The question's id and the user's answer will be logged. So for example, the array will look something like this "1"=>"0","3"=>"0","8"=>"1"
how do I store the array in my table?
The array will be searched to check which choice the user answered if he/she returned to that question.
To save the log create another table like qua_ans_log
with columns userId
, questionId
and answer
and insert the values one by one. This will be more helpful for your db operations than using a single column to save all values.