Arrays PHP, store values into keys and retrieve then
<p>I´m stuck with this problem, i´m the function i´m creating receives two params, $codeList, $priceList both of then are needed to send a XML and for each code and price one more node must be added to the XML, this the code i´m using by now, i have problems</p>

<pre><code>$feed = '
 &lt;?xml version="1.0" encoding="utf-8" ?&gt; 
  &lt;AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"&gt;
&lt;Header&gt;
  &lt;DocumentVersion&gt;1.01&lt;/DocumentVersion&gt; 
  &lt;MerchantIdentifier&gt;XXXXXXX&lt;/MerchantIdentifier&gt; 
&lt;/Header&gt;
  &lt;MessageType&gt;Price&lt;/MessageType&gt;';
</code></pre>

<p>I create two arrays to make and example:</p>

<pre><code>$SKU = array('ASUSVNA1','esx','rer','ASUSasVNA1','itemsdasd','item 24');
$price = array(2,3,4,5,6,7);
</code></pre>

<p>then i do this :</p>

<pre><code>$i = 0;
foreach ($price as $price) {

foreach ($SKU as $SKU) {
  $i++;
  $feed .='
  &lt;Message&gt;
    &lt;MessageID&gt;'.$i.'&lt;/MessageID&gt; 
    &lt;Price&gt;
      &lt;SKU&gt;'.$SKU.'&lt;/SKU&gt; 
      &lt;StandardPrice currency="USD"&gt;'.$price.'&lt;/StandardPrice&gt; 
      &lt;/Price&gt;
  &lt;/Message&gt;';
}



}


  $feed .= '
&lt;/AmazonEnvelope&gt;';
</code></pre>

<p>Works to create the XML but in the output this message is send : Warning: Invalid argument supplied for foreach().</p>