PHP - Help building a multi dimensional array
<p>I would like to know how to get the values into this array. Can someone please help?</p>

<p>Each box whether it is the in or outbox should only be listed once and then have multiple ids associated with them. I need to be able to tell which id came from what box. The ids that are in the array are only samples.</p>

<pre><code>$arr = 
array(
       'Inbox'=&gt; array('id' =&gt; array(8, 9, 15)),
       'Outbox'=&gt; array('id' =&gt; array(8, 9, 15))
    );
</code></pre>

<p>Thanks</p>

<p><hr /></p>

<pre><code>$inbox = $db-&gt;Query("SELECT * FROM mail_inbox");
$outbox = $db-&gt;Query("SELECT * FROM mail_outbox");


foreach($inbox as $key =&gt; $array)
{
  $output['Inbox']]['id'][] = $array['msg_seq'];
}
foreach($outbox as $key =&gt; $array)
{
  $output['Outbox']]['id'][] = $array['msg_seq'];
}

print_r($output);
</code></pre>

<p>This will give me the db fields from the inbox but I have no idea how to get the outbox in there as well. I also get undefined index for ['Box']</p>
