I thought I would throw this one out, since I hadn't seen very many ways of addressing oracle select data easily.
This allows you the ability to loop through the sql select return and reference the column data by $array[column name];
function listStates()
{
$dbName ="START";
$dbUser ="start";
$dbPwd ="start";
$ociLink =ociLogon($dbUser","$dbPwd","$dbName");
$state_Select ="SELECT * FROM table_name";
$selectStmt =ociParse($ociLink,$state_Select);
print "<select name=state size=1>\n";
ociExecute($selectStmt);
while(ociFetch($selectStmt))
{
$tableColumns = ociNumCols($selectStmt);
for($nc = 1; $nc <= $tableColumns; $nc++)
{
$states[(ociColumnName($selectStmt, $nc))] = ociResult($selectStmt, $nc);
}
print "<option value=$states[STATE_ABR]>$states[STATE]</option>\n";
}
ociFreeStatement($selectStmt);
print "</select>\n";
}