Here is my select option
<select name="recomemded_food[]" value="" style="width:560px;" multiple class="chosen-select" >
<option value="American Black Bear">American Black Bear</option>
<option value="Asiatic Black Bear">Asiatic Black Bear</option>
<option value="Brown Bear">Brown Bear</option>
<option value="Giant Panda">Giant Panda</option>
</select>
And below is my code trying to use the foreach loop to get the array value. but is show me the error
@foreach (explode(',',old('recomemded_food')) as $recomemded_food)
{{$recomemded_food}}
@endforeach
Error Message : explode() expects parameter 2 to be string
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire