php - sucking information from option tag and putting it in a table? -


possible duplicate:
best methods parse html

i have lot of option tags , want contents of tags , display in table. think it's possible don't know how.

e.g.

<option value="not part">i want part</option> 

you can achieve through javascript.

pseudocode:

var options = document.getelementbytagname("options") //this options 

or use

var option = document.getelementbyid("dropdown").options 

iterate through options , add content dynamically table. may refer http://www.codeproject.com/kb/html/html.aspx on adding rows dynamically.


Comments