Link to home
Start Free TrialLog in
Avatar of sambitnanda
sambitnanda

asked on

dynamic dropdown in php using array and select name

I am trying to create the dynamic dropdown menu in php , taking result from array

here is the code

unction Display_Screen2()
{
 global $secret_question_name;


 #echo $secret_question_name[2];
 print <<< HERE
 <form>
 <table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr>
 <td>
User Secret Question


   <select name = "User_Secret_Question" tabindex="2">
     while($i=0 < 4)
     {
     <option value = \"$secret_question_name[$i]" size="20">$secret_question_name[$i] </option>;
       }
   </select>
 </td>
 <td>


I do not think it ever execute the while loop,  My main object is write one  <option value ... >
and put the data from  array and to display the final dripdown menu



ASKER CERTIFIED SOLUTION
Avatar of ryan-h
ryan-h

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial