please help me to populate rows from MySQL to dropdown menu.
$result = R::getCol("SELECT name FROM language");
I see all beans, but how can I put this beans into dropdown menu and can send multiple values to MySQL?
<select name="languages">
?????
</select>
Thanks!
That returns an array of values, so a simple foreach should process that nicely
$names = R::getCol("SELECT name FROM language");
echo '<select name="languages">';
foreach( $names as $name ) {
echo "<option value='$name'>$name</option>";
}
echo '</select>';