3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $variable = 'VALOR'; ?> <option value="opcion" <?php if ($variable=='VALOR1') echo 'selected' ?>>VALOR1</option> <option value="opcion" <?php if ($variable=='VALOR2') echo 'selected' ?>>VALOR2</option> <option value="opcion" <?php if ($variable=='VALOR3') echo 'selected' ?>>VALOR3</option>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<option value="opcion" >VALOR1</option> <option value="opcion" >VALOR2</option> <option value="opcion" >VALOR3</option>