title: Process XML item with delimited values into PHP array
body: <p>I am trying to process an XML item into a PHP array and simply return it.</p>
  
  <p>However, I am getting "Array to string conversion" as an error on line 3.</p>
  
  <p><strong>PHP Code</strong></p>
  
  <pre><code>function processPlayers($players) { // paramater is the XML item
      $playerGUIDS = array();
      $playerGUIDArray = explode(";", $players); // CREATE ARRAY FROM STRING WHICH HAVE A ; DELIMINATER
  
      foreach($playerGUIDArray as $player) {
          $playerGUIDS[] = $player;   
      }
      return $playerGUIDS;
  }
  </code></pre>
  
  <p><strong>XML Item</strong></p>
  
  <pre><code>&lt;playguid&gt;DC242003;BY523643&lt;/playguid&gt;
  </code></pre>
  
  <p>I am using WP ALL Import as a plugin so I specify my custom field data value as</p>
  
  <pre><code>[processPlayers({playguid[1]})]
  </code></pre>
  
  <p>See here: </p>
  
  <p><a href="http://www.wpallimport.com/2015/10/wp-all-export-1-1-1-function-editor/" rel="nofollow">http://www.wpallimport.com/2015/10/wp-all-export-1-1-1-function-editor/</a>
  <a href="http://www.wpallimport.com/documentation/advanced/execute-php/" rel="nofollow">http://www.wpallimport.com/documentation/advanced/execute-php/</a></p>
  
  <p>My ideal output is below (this is the form of metadata in a WordPress DB).</p>
  
  <pre><code>a:2:{i:0;s:8:"JC745819";i:1;s:8:"JB705789";}
  </code></pre>