<?php
$i = 0;
foreach($prj_data as $prj_pop) {?>
<input type="checkbox" class="checkbox_project" value="<?php echo $prj_pop->name;?>"
<?php
if($temp_imp[$i]==$prj_pop->name) echo 'checked="true"'; ?>>
<?php //echo $prj_pop->name; ?>
<br><br>
<?php
$i++;
}?>
- Foreach is used for showing the dynamic checkboxes
- Total checkboxes are 4
$temp_imp[$i]
is getting the valuesSchool Children Admission Fee
$prj_pop->name
is also having valuesSchool Children Admission Fee
Actual output to be checkbox to be checked while editing is 2 checkboxes since $i is incremented all the checkboxes are selected. Pls help me with this. The above is my way