I have the following code:
$data[\'x\'] = $this->x->getResults(); $data[\'y\'] = $data[\'x\']; //some code here to modify $data[\'y\'] //this cause
array_flip() won't work when array values are not strings nor integers. I found a simple solution, however:
array_flip()
$clonedArr = (array)clone(object)$arr;
This works thanks to the properties of clone on an object.