PFBC is a simple yet totally undocumented framework that is really useful to get started, it is less complex than other frameworks and looks really nice Out of the box.
http://code.google.com/p/php-form-builder-class/
I have the following two arrays in PHP:
$area = [0=>"name", 10=>"name2", 11=>"name3"];
$ppl = [0=>"name", 1=>"name2", 2=>"name3"];
I want to use them as select, where the user will be able to choose between the names. This is the code I use for each:
$form->addElement(new Element\Select(htmlentities("Area type:"),
"area", $area, array("required" => 1)
));
$form->addElement(new Element\Select(htmlentities("Person:"),
"ppl", $ppl, array("required" => 1)
));
I was expecting to have this:
<select id="area" required="" name="area">
<option value="1">
name
</option>
<option value="10">
name2
</option>
<option value="11">
name3
</option>
</select>
Wich i got for the first array ($area) but for the second array ($ppl) i've got:}
<select id="ppl" required="" name="ppl">
<option value="name">
name
</option>
<option value="name2">
name2
</option>
<option value="name3">
name3
</option>
</select>
-- I need the numeric code as value since i will use what the user chooses to query a database by that id
Any ideas of what might happen?