I began to get irritated that I always had write a foreach for the Dropdowns after the query. So I was thinking isn’t there a more easier way to do it. First I wrote a helper to do it for me but It was clumsy in my opinion. Since I like nice clean applications I extended the Database_Driver class. The problem is that you need too add it directly to system because you can’t write it in app.
Therefore you will need to add the following code in “\system\libraries\drivers\Database.php”:
After you did this you can use it like this:
Robert-Jan de Dreuhttps://codersopinion.com