title: Warning: array_merge(): Argument #2 is not an array Warning: array_merge(): Argument #1 is not an array
body: <p>Please take a look to my code below .    </p>
  
  <pre><code>    $referenceTable = array();
      $referenceTable['val1'] = array(1, 2);
      $referenceTable['val2'] = 3;
      $referenceTable['val3'] = array(4, 5);
  
      $testArray = array();
  
      $testArray = array_merge($testArray, $referenceTable['val1']);
      var_dump($testArray);
      $testArray = array_merge($testArray, $referenceTable['val2']);
      var_dump($testArray);
      $testArray = array_merge($testArray, $referenceTable['val3']);
      var_dump($testArray);
  </code></pre>
  
  <p>I was trying to work with two arrays as you can see and while trying to merge the empty array with the older ones i am getting the warnings as</p>
  
  <pre><code>Warning: array_merge(): Argument #2 is not an array
  Warning: array_merge(): Argument #1 is not an array
  </code></pre>
  
  <p>The Output which i get is </p>
  
  <pre><code>array(2) { [0]=&gt; int(1) [1]=&gt; int(2) }
  NULL
  NULL
  </code></pre>
  
  <p>I am unable to fix this thing , help appreciated . </p>