Can someone tell me what's wrong with this simple PHP
<pre><code>    &lt;?php
  header("Content-type: text/xml");
  $names = array (
   "John Smith", "John Jones", "Jane Smith", "Jane Tillman",
   "Abraham Lincoln", "Sally Johnson", "Kilgore Trout",
   "Bob Atkinson","Joe Cool", "Dorothy Barnes",
   "Elizabeth Carlson", "Frank Dixon", "Gertrude East",
   "Harvey Frank", "Inigo Montoya", "Jeff Austin",
   "Lynn Arlington", "Michael Washington", "Nancy West" );
if (!$query) {
   $query=$_GET['query'];
}
echo "&lt;?xml version=\"1.0\" ?&gt;\n";
echo "&lt;names&gt;\n";
while (list($k,$v)=each($names)) {
   if (stristr($v,$query)) {
      echo "&lt;name&gt;$v&lt;/name&gt;\n";
   }
}
echo "&lt;/names&gt;\n";
?&gt;
</code></pre>

<p>As you can see this PHP is simply looking up a name in an array.<br>
I put this php file in my xampp root and then type search.php?query=John in my browser, then it tells me<br>
<em>This page contains the following errors:
error on line 2 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.</em><br>
what's wrong?</p>
