When I retrieve a record from a database ($rs), I place the results into an array ($data_out) using this coding:
for ($i = 0; $i < $rs->Fields->Count(); $i++) {
$this->data_out[$rs->Fields[$i]->Name()] = $rs->Fields[$i]->Value();
}
With PHP 4, it works since the value in placed in the $data_out array. The values are maintained when the record, $rs, no longer exists.
It appears that with PHP 5, the value is passed by reference because when I clear the result set ($rs) and try to use the $data_out array, an error is produced.
Is my assumption correct about PHP 5 passing values by reference? And if it is, is there a workaround?
Many thanks....
Todd