I have this code:
$arrayWithSelectedValues = [[user_id] => 3,[language_id] => 2], [user_id] => 3,[language_id] => 12]]
And I have checkbox :
@foreach($languages as $language)
<fieldset>
<input type="checkbox"
class="icheckbox_square-red"
id="input-15" name="languages[]"
value="">
<label for="input-15"></label>
</fieldset>
@endforeach
How can I mark checkboxes as marked - those that have language_id from the array = $ language-> id?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire