if($xmlobj = simplexml_load_string(file_get_contents($xml_feed)))
{
$result = $xmlobj->xpath("TrafficMeta");
}
上面的代码返回所需的结果,并与print_r的观察,它显示了这一点,这就是我想要得到(阶段ID):如何使用PHP将xpath结果转换为字符串?
Array ([0] => SimpleXMLElement Object ([sessionId] => tbfm1t45xplzrongbtbdyfa5))
我怎样才能使这个的sessionId为一个字符串?
非常感谢您的帮助soulmerge,感谢您的时间! – 2009-10-03 14:43:42