You passed the second parameter OCI_ASSOC to oci_fetch_array() , which will only retrieve the associative array.
If you change this parameter to OCI_BOTH , it will return both a numeric and associative array.
OCI_BOTH - the default value. Thus, even you can leave this parameter empty.
Change
while (($result = oci_fetch_array($data, OCI_ASSOC)) != false) {
For
while (($result = oci_fetch_array($data, OCI_BOTH)) != false) {
OR IN (as OCI_BOTH by default):
while (($result = oci_fetch_array($data)) != false) {
Read here:
http://php.net/manual/en/function.oci-fetch-array.php
source share