|
Posted by millw0rm@gmail.com on 10/28/42 11:33
hi, how to create a optgroup dynamically based on the value of an
array...
for eg.,
$data =
array("apple","age","axe","alpha","beta","basic","byte","crystal","call","crypt","php","apache","cgi","ajax","mysql","monkey","giga","kilobyte","space","cyber","delta","gamma","germ","gemini","words","code");
natcasesort($data);
i want all the array=>values starting with letter 'a' shld be grouped
like
<optgroup LABEL="A">
<option VALUE="apple">apple
<option VALUE="age">age
<option VALUE="axe">axe
</optgroup>
For 'b'...
<optgroup LABEL="B">
<option VALUE="beta">beta
<option VALUE="basic">basic
<option VALUE="byte">byte
</optgroup>
......................... so on
thnx
[Back to original message]
|