this is the code I have
variable that I bring from the database $ profile ['image']; < --- in this variable I can bring several options for example:
presentable,aseado
presentable,aseado,De traje
Presentable,aseado,uniforme
so if for example the variable brings presentable, neat in the option I would like to do a if($perfil['imagen'] == 'presentable'){ //codigo}
Something like this if you could give me an example
$perfil['imagen'];
<option if($perfil['imagen'] == 'presentable'){ echo "selected";} value="presentable">Presentable</option>
<option if($perfil['imagen'] == 'aseado'){ echo "selected";} value="aseado">Aseado</option>
<option if($perfil['imagen'] == 'traje'){ echo "selected";} value="traje">Traje</option>
<option if($perfil['imagen'] == 'condicion saludable'){ echo "selected";} value="condicion saludable">Condicion saludable</option>
<option if($perfil['imagen'] == 'sin tatuajes'){ } value="sin tatuajes">Sin tatuajes</option>
<option if($perfil['imagen'] == 'sin percing'){ } value="sin percing">Sin percing</option>
<option if($perfil['imagen'] == 'sin expansiones'){ } value="sin expansiones">Sin expansiones</option>
I would like something similar to this to validate if the value of the varible $ profile ['experience'] that comes from the database with some of the values of the option is equal
is an example I made but the variable $ profile ['experience'] (6 months) only brought a value
$perfil['experiencia'] == "6 meses"
<option <?php if($perfil['experiencia'] == "6 meses"){ echo "selected"; } ?> value="6 meses">6 meses</option>
<option <?php if($perfil['experiencia'] == "1 año"){ echo "selected"; } ?> value="1 año">1 año</option>
<option <?php if($perfil['experiencia'] == "2 años"){ echo "selected"; } ?> value="2 años">2 años</option>
<option <?php if($perfil['experiencia'] == "5 años"){ echo "selected"; } ?> value="5 años">3 años</option>
Here is the solution that I needed to validate the options the correct question was to look inside an array if the word x existed value="presentable"> Presentable