title: print all nodes SimpleXML
body: <p>It's my first xml parser script.
  My code:</p>
  
  <pre><code>&lt;?php
  $xmlstring = "
  &lt;book&gt;
      &lt;note&gt;
      &lt;to&gt;Tove&lt;/to&gt;
      &lt;from&gt;Jani&lt;/from&gt;
      &lt;heading&gt;Reminder&lt;/heading&gt;
      &lt;body&gt;Don't forget me this weekend!&lt;/body&gt;
      &lt;/note&gt;
      &lt;note&gt;
      &lt;to&gt;Tove1&lt;/to&gt;
      &lt;from&gt;Jani&lt;/from&gt;
      &lt;heading&gt;Reminder&lt;/heading&gt;
      &lt;body&gt;Don't forget me this weekend!&lt;/body&gt;
      &lt;/note&gt;
  &lt;/book&gt;
  ";
  
  $xml = new SimpleXMLElement($xmlstring);
  foreach($xml-&gt;note as $note){
      echo $note["to"] . $note["from"] . $note["heading"] . $note["body"];
  }
  ?&gt;
  </code></pre>
  
  <p>i want to print <code>note</code> children. but this code doesn't print anything ..
  Where is the problem?</p>
  
  <p>Thanks...</p>