mardi 29 août 2017

abbreviating if statement in PHP

I'm creating dropdowns in php for my website and I'm trying to add a check box that matches it's value based on the selection of the three dropdowns. So far, I got everything working perfectly; however,in order to make the check box working right I have to add every possible combination of each dropdown to the code using if statements. I generated a list of all possible combinations and the list is like 2400 combination which will take me a long time to add each one of them as an if statement to the code. So my question is that is it possible to find a shortcut coding all these combinations instead of writing 2400 if statement to cover all combinations?




Aucun commentaire:

Enregistrer un commentaire