Today I had an import script to pull data from Oracle into a MySQL instance, but the script returned an “undefined index” error for one of the fields in the result set. I thought that was odd, but sure enough, the field with a null value was not returning “NULL” but not returning at all. A quick Google search shows that OCI has a constant called “OCI_RETURN_NULLS” which solved my problem. To add more than one constant in your connection or oci* function, use the + sign (e.g. OCI_ASSOC+OCI_RETURN_NULLS).