<div class="form-group">
<label for="designation">Reporting Heads</label> <br>
<?php
$heads = TCG\Voyager\Models\Head::all();
?>
<?php $i=0; ?>
@foreach($heads as $heads)
<?php
$headvalues=explode(',',$test->reporting_head);
?>
<input type="checkbox" name="check_list[]" value="_"<?php echo($headvalues[$i]==$heads->id?'select':'') ?>><label></label>
<?php $i++; ?>
@endforeach
</div>
<input type="hidden" name="id" value="" />
$headvalues array would like.
Array
(
[0] => 1
[1] => 3
)
Here 1 and 3 are head ids .i want to select check box for 1 and 3.How can i do this?please help m
Aucun commentaire:
Enregistrer un commentaire