PHP和OCI,填充下拉菜单

I want to populate a html drop down menu with a list query from database. I have the following...

<?php
$conn = oci_connect(//connection stuff goes here//);
$stid = oci_parse($conn, "SELECT DESCRIPTION FROM COUNTRY WHERE COUNTRY_ID IS NOT NULL");

$result = oci_execute($stid, OCI_DEFAULT);



echo '<select>';

while ($row = oci_fetch_array($result)) {
echo '<option value=' . $row['DESCRIPTION'] . '</option>';
}
echo '</select>';

?>

Something to with the qoute marks on the echo line? Any help here would be great :)

Yes, your assumption was right, you have to enclose your description in double quotes and also insert it inside the tags, like this:

echo '<option value="' . $row['DESCRIPTION'] . '">'.$row['DESCRIPTION'].'</option>';

This question has nothing to do with Oracle. Just replace this:

echo '<option value=' . $row['DESCRIPTION'] . '</option>';

... with this:

echo '<option>' . htmlspecialchars($row['DESCRIPTION']) . '</option>';

You were basically generating this:

<option value=Blah Blah Blah</option>

Edit: And you forgot about COUNTRY_ID! Add it to the SELECT statement and use it:

echo '<option value="' . htmlspecialchars($row['COUNTRY_ID']) . '">' . htmlspecialchars($row['DESCRIPTION']) . '</option>';