Php How to set the selected option from presence of a variable

How to set the selected option from presence of a variable is this simple.


<option value="somevalue" <?= ? array_key_exists('variablename', $_GET) "selected" : "" ?>>Display value
</option>

Comments

Popular posts from this blog

Vim vi how to reload a file your editing