I have a selection menu. I populate it from the database:
$value = mysql_query("SELECT title FROM movies ORDER BY id DESC");
$i = 0;
while ($row = mysql_fetch_object($value))
{
$release[$i] = $row->title;
$i++;
}
And I write them:
<select name="release"><?php
foreach($release as $i){
echo"<option value = '$i' > $i </option>";
}
?></select>
It works great, but I would like to write the year of release next to the name in the menu. The year of release is in the same table of films in the field of release. How to add values of two fields?
Thank!
source
share