Database information into separate arrays
<p>here is what I'm trying to do. I'm retrieving information from a database via array. What is happening is the information from the previous array is going into the next array. </p>

<p>Here is the code:</p>

<pre><code>$i = 0;
foreach ($array_name as $key =&gt; test_name) {
 $id = $test_name['id']

 foreach ($test_name['id] as $key =&gt; $test_id {
     $data = ModelClass::Information($test_id);
     $array_name[$i]['new_infroamtion'] = $data'
  }
}
</code></pre>

<p>So right now based on the code data from the table is correctly going into the first array, however, information based from the first array is going into the second array..</p>

<p>Let me know if you need anymore information.</p>

<p>Thank you</p>