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>
<option value="somevalue" <?= ? array_key_exists('variablename', $_GET) "selected" : "" ?>>Display value
</option>
Comments