PHP XML Foreach Error

crack16

New Member
I'm getting an error while looping over an element children:\[code\] $placeById=simplexml_load_file("http://www.43places.com/service/get_place_by_id?api_key=1234&id=".$placeId); $children=$placeById->children; echo '<ul>'; foreach ($children as $child) { echo '<li>'.$child->child.'</li>'; } echo '</ul>';\[/code\]My Output is only this:
  • Alabama
Although there are several children, see the XML here
 
Back
Top