Hello, I am using the tutorial from Oracle's site on how to connect to a database in PHP using code similar to the one shown below.
<?php
// Create connection to Oracle
$conn = oci_connect("phphol", "welcome", "//localhost/orcl");
$query = 'select * from departments';
$stid = oci_parse($conn, $query);
$r = oci_execute($stid);
// Fetch each row in an associative array
print '<table border="1">';
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS+OCI_ASSOC)) {
print '<tr>';
foreach ($row as $item) {
print '<td>'.($item !== null ? htmlentities($item, ENT_QUOTES) : ' ').'</td>';
}
print '</tr>';
}
print '</table>';
?>
Lets say for example, once I have queried the data I need from the Oracle Database, how can I make it show up in an HTML option list similar to the one shown below?
<label for="testOption"><b>Test Option</b><br/></label>
<select name="testOption" id = "testOption">
<option>Test Option</option>
</select>
Thank you in advance for your help.