hi, how to create a optgroup dynamically based on the value of an
array...
for eg.,
$data =
array("apple"," age","axe","alp ha","beta","bas ic","byte","cry stal","call","c rypt","php","a pache","cgi","a jax","mysql","m onkey","giga"," kilobyte","spac e","cyber","de lta","gamma","g erm","gemini"," words","code");
natcasesort($da ta);
i want all the array=>values starting with letter 'a' shld be grouped
like
<optgroup LABEL="A">
<option VALUE="apple">a pple
<option VALUE="age">age
<option VALUE="axe">axe
</optgroup>
For 'b'...
<optgroup LABEL="B">
<option VALUE="beta">be ta
<option VALUE="basic">b asic
<option VALUE="byte">by te
</optgroup>
............... .......... so on
thnx
array...
for eg.,
$data =
array("apple"," age","axe","alp ha","beta","bas ic","byte","cry stal","call","c rypt","php","a pache","cgi","a jax","mysql","m onkey","giga"," kilobyte","spac e","cyber","de lta","gamma","g erm","gemini"," words","code");
natcasesort($da ta);
i want all the array=>values starting with letter 'a' shld be grouped
like
<optgroup LABEL="A">
<option VALUE="apple">a pple
<option VALUE="age">age
<option VALUE="axe">axe
</optgroup>
For 'b'...
<optgroup LABEL="B">
<option VALUE="beta">be ta
<option VALUE="basic">b asic
<option VALUE="byte">by te
</optgroup>
............... .......... so on
thnx
Comment