How To Pass A Json To Checkbox
Json {'segment':'Class I-V Tuition,Class VI-VIII Tuition' ,'Board':['cbse'] ,'Class I-V':['Allsubject'] ,'Class VI-VIII':['cbse','cse/Ise'] ,'Class VI-VIII Subject':['Allsubjec
Solution 1:
You do the same as in your other question, but parse the JSON instead of exploding it.
$cats = json_decode($row['classconducted'], true);
<input type="checkbox" name="segment[]" value="Class I-V Tuition" <?php if(in_array('Class I-V Tuition', $cats)) { echo "checked"; }?>> Class I-V Tuition
Post a Comment for "How To Pass A Json To Checkbox"