I have found this particular class to be useful for a variety of purposes. If ever there is a tree of information, it makes it somewhat simple to place the information into the dropdown via PHP function calls.
I find that it is easier to use function calls to load the data into the forms than the other methods I've tried. A hybridized version of this + templates would probably be optimal.
$ddsb = new dropDownSelectBox('name','formname','description',150); $ddsb->addItem(0,'test1',1); $ddsb->addItem(1,'test1-1',2); $ddsb->addItem(2,'test2-1',4); $ddsb->addItem(1,'test1-2',5); $ddsb->addItem(0,'test2',3); echo$ddsb->get();
I find that it is easier to use function calls to load the data into the forms than the other methods I've tried. A hybridized version of this + templates would probably be optimal.
$ddsb->addItem(0,'test1',1);
$ddsb->addItem(1,'test1-1',2);
$ddsb->addItem(2,'test2-1',4);
$ddsb->addItem(1,'test1-2',5);
$ddsb->addItem(0,'test2',3);
echo $ddsb->get();