I'm trying to make a drop down list with PHP using a foreach loop to loop through the data. This works without a drop down when I was displaying the results in a table so the loop does work.
It seems the drop down list gets populated (as the list expands/contracts when I've added new fields in for testing) but no data is actually shown. I only need to show one field, though. Here's my code:
<select name="language_select">
<?php foreach($this->getContent('languages') as $language => $value) : ?>
<option value="<?($language['name']);?>"></option>
<?php endforeach ?>
</select>
So it fetches an array and tries to return the data, pretty simple. What am I doing wrong?
<?to<?phpand see if that helps.echothe valuevaluelike:<option value="<?($language['name']);?>"><?($language['name']);?></option>(are you echoing the variables?)