title: array_push(): Argument #1 ($array) must be of type array, string given
body: <p>This is my code, and when I run this function I get this: <code>array_push(): Argument #1 ($array) must be of type array, string given</code> I trying to add value to the <code>array</code></p>
  <pre class="lang-php prettyprint-override"><code>$data['status'] = 'success';
  $data['msg'] = 'OK';
  $aa = array();
  if (!empty($countries)) {
      foreach ($countries as $row) {
          $b = $row['iso2'];
          $aa[$b] = array_push($row['name']);
      }
  }
  $data['result'] = $aa;
  
  return setJSON($data);
  </code></pre>
  <p>this must be obtained:</p>
  <pre><code>{
      &quot;status&quot;: &quot;success&quot;,
      &quot;msg&quot;: &quot;OK&quot;,
      &quot;result&quot;: {
          /*&quot;iso2&quot;: &quot;name&quot;,*/
          &quot;DE&quot;: &quot;Germany&quot;
      }
  }
  </code></pre>