I am getting error with the following code
$string.="<input class='jt-test-question-answer-choice-radio' name='q1' type='$input' value='q20a1' onclick=\"correct_answer1(\"$correctanswer\",'$row1[1]')\";/>";
$correctanswer is an array having value "test2,test4"; I have used implode function to split the array and then in the js function I have used split.When clicked the function is not calling.
onclick
property.onclick
value to\"correct_answer1('$correctanswer','$row1[1]')\"