<?php
			echo "Example OCI_FETCH_ARRAY ..OCI_OBJECT <br/>";
			$sql = "select empno, ename from emp WHERE rownum <=6";
			$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);
			//echo" DB connected: querying a table <br/>";
			}
			$stmt = oci_parse($conn, $sql);
			oci_execute($stmt);
			//
			while ($row = oci_fetch_object($stmt)) {
			echo $row->EMPNO . " ".$row->ENAME ." <br/>";
			}
			//
			echo " no of rows : ". oci_num_rows($stmt);
			oci_free_statement($stmt);
			oci_close($conn);
			echo "<br/> Oracle db conection closed";
			//
			?>