I would like to have a php file pull from an text file and place the values into a select box. ex. AA~Produce. I have succesfully placed the result to look like this: ex. <option value="AA">Produce etc....
Now I have another text file
AA270~Apples
AA290~Oranges
I want to select the first AA, and have it select the corresponding sub-categories with it in another select box. I do not know how to do a check to see if the first two letters are the same. I hope this is not to confusing, but I guess what I am saying, is "If I select 1, I want 1-1, 1-2, 1-3" and "If I select 2, I want 2-1, 2-2, 2-3". How do I accomplish this task?
thanks for any help you can give