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
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
}
</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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.