I am getting a strange behaviour.
In a view in Codeigniter I have this code:
<?php echo form_multiselect('post-categories', $active_categories, (!empty($selected_categories))?$selected_categories:null,array('class'=>'form-control')); ?>
Which generates the following HTML
<select name="post-categories" class="form-control" multiple="multiple">
<option value="1">Beauty</option>
<option value="4">More</option>
<option value="3">New</option>
</select>
However when I submit the form with multiple categories selected I receive only strings.
In the controller
var_dump($this->input->post('post-categories'));
will output
string(1) "3"
Is there something I am doing wrong or missing?