Attempting to return this array, however, gives me a NULL value. I can var_dump the contents of the array and all of the database records are displayed on screen. I read that array parameters can be returned, no problem. Cool, so I want to return this results array (stored in the variable $result). But on the receiving end, I am left with a NULL value.
Code: Select all
class DB()
{
function fetch()
{
// Get the results from oci_fetch_all. Results are stored in $results.
return $results;
}
}
$s = new DB();
$x = $s->fetch("sql query here");
var_dump($x); gettype($x); // both return NULL