Foreach as List |
[eluser]RedIgniter[/eluser]
OK, I want a dropdown box where values = id values from the table and the option shows the name of a certain subject lets say the subject name is Math, I want it to be like <option value='1'>PHP</option> I wrote some code where it creates array with all results that match with that user, basically here is my code Code: $subject_delete = array( where $row->id is the id and $row->subject is the subject name; just like 'php' => 'PHP' in usual dropdown in CI i am more than sure I am doing this wrong, what will be the right way to do it?
[eluser]Dennis Rasmussen[/eluser]
Documentation: http://ellislab.com/codeigniter/user-gui...elper.html Your code: Code: $options = array(); |
Welcome Guest, Not a member yet? Register Sign In |