I Want to Select a value in drop-down automatically based on controller in
codeigniter,when a view is loaded then select field value is auto select by the
controller as per requirment. basically i want to manage the drop down from
controller.
What should i need to do?
For Example:-
My View File Code is
<select id="category">
<option value="first">first</option>
<option value="second">second</option>
<option value="Third">Third</option>
<option value="fourth">fourth</option>
</select>
Here is my controllers
firstcontroller,secondcontroller,thirdcontroller,fourthcontroller
Required Code:- firstcontroller load select field value is first.
same as secondcontroller - second then third, fourth are in same way.Is there a way to manage the slect field from controller.