javascript - Creating a pulldown on website using values from php variable? -
i creating form user can add more fields form if need them data. i using javascript function triggered action button creates row of textboxes , 1 pull down field. however in row need pull down options "yes , no", have them in php array variable called $success this have try , create pull down not working. ta[n]=document.createelement('option'); ta[n].value = <?php echo $success; ?>; ta[n].name='success'+n; could me out time :) this bulk of current code if(inp[c].value=='add') { inp[c].onclick=function() { ta[n]=document.createelement('input'); ta[n].setattribute('rows',1); ta[n].setattribute('cols',20); ta[n].name='time'+n; document.getelementbyid('txtara').appendchild(ta[n]) ta[n]=document.createelement('input'); ta[n].setattribute('rows',1); ta[n].setattribute(...