PHP If URL contains only a certain parameter -


i understand can use following see if parameter p exists in url. work if there q, t, r etc parameter

if(isset($_get['p'])) {}

i know following sees if there parameter set

if(count($_get)) {}

however need is:

if parameter p exists -> something... else if parameter p exists , other parameter exists else something... else if parameter != p , or no parameter exists - else

any tips appreciated

if(isset($_get['p']) && count($_get['p']) == 1){ //do } else if (isset($_get['p'])){ //do } else { //do else } 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -