I am trying to extract some data from XML but when I execute the following I get a "Warning: Invalid argument supplied for foreach() in ..." message
foreach ($xml->custom-field-value as $milestone) {
print "<tr>";
print "<td>".$milestone->{'field-number'}." ".$milestone->{'value'}."</td>";
print "</tr>";
}
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?