title: Push associative array from for-loop in php
body: <p>The for loop is supposed to loop 10 times.
  When I just print the <code>$fname</code>, <code>$lname</code> and <code>$email</code>
  I am getting the 10 data (Working fine)</p>
  
  <p>But I need to store those value in an  associative array.</p>
  
  <pre><code>$assocDataArray = array();
  foreach ($data as $key =&gt; $value) {
      foreach ($value['emails'] as $lead) {
          $fname = $lead['first_name'];
          $lname = $lead['last_name'];
          $email = $lead['value'];
  
          //put objects in array
          $assocDataArray += [ "First Name" =&gt; $fname ];
          $assocDataArray += [ "Last Name" =&gt; $lname ];
          $assocDataArray += [ "Email" =&gt; $email ];
      }
  }
  
  var_dump($assocDataArray);
  </code></pre>
  
  <p><code>var_dump</code> is only giving me one array [Expected 10] </p>