title: Using XML node names with hyphens in PHP
body: <p>I am trying to extract some data from XML but when I execute the following I get a </p>
  
  <blockquote>
    <p>Warning: Invalid argument supplied for foreach() in ...</p>
  </blockquote>
  
  <p>Code Example:</p>
  
  <pre><code>foreach ($xml-&gt;custom-field-value as $milestone)
  {
      ...     
  }
  </code></pre>
  
  <p>It works fine for node names that are single words so I am guessing that it doesn't like the hyphens. Do I need to escape them and if so how?</p>