I have been sent a param called questionList. The format is like this:-
'questionList' = [{"qid":"1","ans":"798789","qst_type":"text_area"},
{"qid":"2","ans":"1","qst_type":"radio"},
{"qid":"3","ans":"3","qst_type":"radio"},
{"qid":"4","ans":"789789","qst_type":"text_area"},
{"qid":"5","ans":"like","qst_type":"like_dislike"},
{"qid":"6","ans":4,"qst_type":"rating"},
{"qid":"7","ans":"2","qst_type":"smiley"}]
How can I parse the results as array?
You are receiving JSON
formatted string. Use json_decode($string, [$useAssoc])
to make it back to PHP array.