Dynamically change text depending on url variable, but only if

I just learned to dinamically insert the url variable in a text with
<?php echo htmlspecialchars($_GET['aff']);?>

when a url is like https://mysite.com?aff=somevalue

I wonder though if there is a technique to only make the change if the url variable is present in a list somewhere, and if it is not to just print a default value?

In other words I do not want to the change to happen in all cases, but only if the url variable value exists on a list I compile.

Thank you for any help!

if statements; if else statements; switch statements; so, yeah.

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service