Ternstyle
Ternstyle
A web software and design firm
Often when creating databasing applications with front-end or back-end user interfaces it’s necessary to create HTML form select elements from database record sets or other arrays. This class offers a very easy and efficient way to compile these form elements with one command.
The current version of this software is 4.5.
$array = array("key1"=>"value1","key2"=>"value2"); $select_class = new selectClass(); $object = $select_class->select($array,'id','name','title','class');
The above variable $object will be an HTML form element which will print to a page like so:
<select id="id" name="name" title="title"> <option value="value1">key1</option> <option value="value2">key2</option> </select>
Connect with us
We dig the back-and-forth.