I'm trying to populate a select option with values from a database and I followed the instructions from and the created select field is:
CodePudding user response:
You have to use
<option value="<?php echo $row['idattributevalue']; ?>"><?php echo $row['attributevalueEN']; ?></option>
OR:
<option value="<?=$row['idattributevalue']; ?>"><?=$row['attributevalueEN']; ?></option>
If you enable
short_open_tag=On
in your php.ini file.
To enable "short tag" without editing php.ini file use
ini_set('short_open_tag', 'On');
on top of your project.