[eluser]xwero[/eluser]
Then you only have one image or you would have to do something like
Code:
<style type="css/text">
#tester .option1{
padding-left: 25px;
background: transparent url(path/to/icon1.png) top left no-repeat
}
#tester .option2{
padding-left: 25px;
background: transparent url(path/to/icon2.png) top left no-repeat
}
</style>
<select id="tester">
<option value="1" class="option1">Option 1</option>
<option value="2" class="option2">Option 2</option>
<option value="3" class="option3">Option 3</option>
<option value="4" class="option4">Option 4</option>
</select>
Which is not very maintainable. But if you use style it would work.
Code:
<?php foreach($countries as $country){ ?>
<option value="<?php echo $country['value']; ?>"<?php echo $country['attr']; ?>><?php echo $country['value']; ?></option>
<?php } ?>
where $country['attr'] would output something like
Code:
style="background: transparent url(path/to/flag.png) top left no-repeat;"