So I'm looking to return a JSON array containing specific data from a PHP page depending on what parameters/values I supply (the information will be used by an Android application). However I'm not convinced this is the best method to do this, for example I could use things like.
page.php?allcategories
page.php?specificcategory=12
page.php?specificpage=55
(I'd probably have about 7 different parameter types in total).
Obviously within the PHP script, I'd just have several conditional statements to test if these parameters exist.
Is there a more robust or simply 'better' method of doing what I'm trying to achieve? As this was my first idea.
Many thanks