I have the following code:
$data[\'x\'] = $this->x->getResults(); $data[\'y\'] = $data[\'x\']; //some code here to modify $data[\'y\'] //this cause
You could use this function to copy multidimensional arrays containing objects.
$val ) { if( is_array( $val ) ) { $result[$key] = arrayCopy( $val ); } elseif ( is_object( $val ) ) { $result[$key] = clone $val; } else { $result[$key] = $val; } } return $result; } ?>