I'm new in codeigniter framework, I just want to get the values from selected dropdown array in my form using CI. Assumed these are the whole process.
I have form with auto populated cities,
example in view
<select name="city[]">
<option value="ABC"> ABC </option>
</select>
<select name="city[]">
<option value="EFG"> EFG </option>
</select>
Here is the controller
$this->form_validation->set_rules('city[]', 'city');
When I echo it out on my model form
echo $this->input->post('city');
it just shows array, Any ideas?
echoan array. Useprint_r()orvar_dump()to see what's inside and access a specific value if you'd like or loop through the array if you want all of them.