title: PHP: Returning XML in SOAP function call
body: <p>I want to return the following XML in SOAP when a function is called rather than just a string. There are many different functions that will return an xml formatted this way, is there a way that I can define what a function returns? Like making my own data type?</p>
  
  <pre><code>&lt;meta&gt;
      &lt;supplier&gt;Amazon.com&lt;/supplier&gt;
      &lt;datetime&gt;2010/08/21 14:32:40&lt;/datetime&gt;
  &lt;/meta&gt;
  &lt;results&gt;
      &lt;result&gt;
          &lt;manufacturer&gt;Intel&lt;/manufacturer&gt;
          &lt;itemno&gt;8236476234&lt;/itemno&gt;
          &lt;prices&gt;
              &lt;price&gt;
                  &lt;quantity&gt;10&lt;/quantity&gt;
                  &lt;cost&gt;$1.20&lt;/cost&gt;
              &lt;/price&gt;
              &lt;price&gt;
                  &lt;quantity&gt;100&lt;/quantity&gt;
                  &lt;cost&gt;$0.80&lt;/cost&gt;
              &lt;/price&gt;
          &lt;/prices&gt;
      &lt;/result&gt;
      &lt;result&gt; ... &lt;/result&gt;
  &lt;/results&gt;
  </code></pre>