Register now or log in to join your professional community.
As $referenceTable['val2'] isn't an array, then array_merge function failed to merge it with $testArray.
Could you first clarify what does the following function do ?
var_dump($testArray);