Optimisation du code
Posté : 27 janv. 2009, 09:18
Code : Tout sélectionner
<option <?php if ($yeux=="0") {echo 'selected="selected"';} ?> value=""></option>
<option <?php if ($yeux=="1") {echo 'selected="selected"';} ?> value="1">Autres</option>
<option <?php if ($yeux=="2") {echo 'selected="selected"';} ?> value="2">Bleus</option>
<option <?php if ($yeux=="3") {echo 'selected="selected"';} ?> value="3">Gris</option>
<option <?php if ($yeux=="4") {echo 'selected="selected"';} ?> value="4">Marrons</option>
<option <?php if ($yeux=="5") {echo 'selected="selected"';} ?> value="5">Noirs</option>
<option <?php if ($yeux=="6") {echo 'selected="selected"';} ?> value="6">Noisettes</option>
<option <?php if ($yeux=="7") {echo 'selected="selected"';} ?> value="7">Verts</option>