Objectives: oci_bind_by_name multiple variables
Intranet: http://manas8x/BareBone_PHP/oci8_functions/bind_by_name2/oci_bind_by_name3.php
Script:

<html>
<head>
<title> oci_bind_by_name3.php</title>
<style type="text/css">
html, body { height: 100%; }
.td1 { width: 65px; height: 10px;background-color:#b0c4de;}
.td2 { width: 65px; height: 10px; font-size:10px;}
</style>
<body>
<?php
echo "oci_bind_by_name funciton : multiple variables <br/>";
//
$conn = oci_connect('scott', 'Son', 'localhost/orcl.gateway.2wire.net');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stmt = oci_parse($conn, 'select * from emp where deptno = :dno and job = :ejob');
//BINDING DATA
$earray =array(':dno'=> 30, ':ejob'=> "SALESMAN");
foreach($earray as $key =>$val)
{
oci_bind_by_name($stmt, $key, $earray[$key]);
}
oci_execute($stmt);
//
// HEADER TABLE
echo "<table border=\"1\">";
echo "<tr>";

$ncols = oci_num_fields($stmt);
$nrows= oci_num_rows($stmt);
for ($i = 1; $i <= $ncols; $i++) {
$column_name = oci_field_name($stmt, $i);
echo "<td class='td1'>$column_name</td>";
}
//
echo "</tr></table>\n";
//REPORT
echo "<table border='1'>\n";
while(($row=oci_fetch_array($stmt, OCI_ASSOC))){
echo "<tr>\n";
foreach ($row as $item) {
echo "<td class='td2'>".htmlentities($item) . " :&nbsp;"."</td>\n";
} //foreach ends
echo "</tr>\n";
}//while block ends
echo "</table>\n";
//
//
echo "</tr></table>\n";
oci_free_statement($stmt);
oci_close($conn);
echo "<br/> Oracle db conection closed";
//
?>
</body>
</html>

runtime display