Jump to content

Need help to add values in list box


rumon007

Recommended Posts

I have created a list box writing a code as follows:

 

<select name=\"select_to_edit\">

<option selected>- -Select a Country- -</option>

</select>

 

And I have to variables named $id and $country_name.

 

Now I want to show the values of the $country_name variable in the List Box.

 

Please someone help me to write the code.

Link to comment
https://forums.phpfreaks.com/topic/141774-need-help-to-add-values-in-list-box/
Share on other sites

where are you getting the values from ?  array ... database ... text file ?

 

He did...

 

And I have to variables named $id and $country_name.

 

I'm guessing you want the option to be $country_name and the value that you reference the $id.  Try something like:

 


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.