|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
multiple select intelligent array
I need help on this multiple select script,
================= PHP Code:
i want to put the selections of the users from this form in an array, but i want it to be intelligent such that when I select "Asia, Japan, Europe and Canada", my array will contain [China, Japan, France, Germany, Canada] or if I select All Regions, all the countries in the selection will be selected. Last edited by markrenn : June 4th, 2003 at 04:56 AM. |
|
#2
|
|||
|
|||
|
well,....whatever you select should be contained in the $Country array. not sure what you want to do with it after that though.
__________________
-- Jason |
|
#3
|
|||
|
|||
|
hi taelo,
what i would like to do is for the array to filter its content such that when i select asia, it woul automatically include all countries in asia, if I select asia and japan, it will still include all countries in asia but not duplicating japan as an element in the selection. i would also like to filter the array so that the names of the continents will not be included, only the countries in that selected continent. hope to get your comments and answers soon |
|
#4
|
|||
|
|||
|
well I am assuming you are retrieving this information from a database? I would make an association between a continent and a country. then you can retrieve the information very easily.
make sense? |
|
#5
|
|||
|
|||
|
well,,,, here's what i did. i placed all asian countries in asia_array, european countries in europe_array and north american countries in namerica_array. then i compared the post to each array i have. if asia is selected in the post and there is also another country in the post that match asia_array, all countries in asia_array will be included in the selection without making duplicates of the asian countries in the post
|
|
#6
|
|||
|
|||
|
good deal, glad to hear you solved your problem
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > multiple select intelligent array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|