I have two xml files, "events.xml" and "items.xml"...
Code:
<events>
   <event>
      <title>First Event</title>
      <itemids>1,2</itemids>
   </event>
</events>

<items>
   <item>
      <title>item1</title>
      <id>1</id>
   </item>
   <item>
      <title>item2</title>
      <id>2</id>
   </item>
   <item>
      <title>item3</title>
      <id>3</id>
   </item>
   <item>
      <title>item4</title>
      <id>4</id>
   </item>
</items>
I'm using simplexml to load both files, ultimately I'm trying to parse it as if were one file like this...
Code:
<events>
   <event>
      <title>First Event</title>
      <items>
         <item>
            <title>item1</title>
            <id>1</id>
         </item>
         <item>
            <title>item2</title>
            <id>2</id>
         </item>
      </items>
   </event>
</events>
I'm thinking I need to use array_intersect_key() but on the item->id, not the item key.