hi i have this multiple selector where i can only match one item at a time from the MySql database please help. i have use implode and explode to insert and update the string. i want to select multiple items from the list.
<!-- Select Multiple -->
<div class="form-group">
<label class="col-md-4 control-label" for="skills">Skills</label>
<div class="col-md-4">
<select id="skills" name="skills[]" class="form-control" multiple="multiple">
<option value="0"
<?php
if(isset($skills)){
(explode(" ",$skills));
in_array('0', $skills) ? 'selected' : '';
?>>php</option>
<option value="1" <?php
in_array('1', $skills) ? 'selected' : '';
?>>WordPress</option>
<option value="2" <?php
in_array('2', $skills) ? 'selected' : '';
?>>HTML</option>
<option value="3" <?php
in_array('3', $skills) ? 'selected' : '';
?>>CSS</option>
<option value="4" <?php
in_array('4', $skills) ? 'selected' : '';
}
?>>JS</option>
</select>
</div>
</div>