Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从SimpleXml对象获取值_Php_Simplexml - Fatal编程技术网

Php 如何从SimpleXml对象获取值

Php 如何从SimpleXml对象获取值,php,simplexml,Php,Simplexml,如何获得计划的价值,从中获得的金额,有人能帮我吗 通过XPath 在建议的xpath旁边,手册中有一些基本示例,这些示例对于理解simplexml的工作原理非常有帮助。 SimpleXMLElement Object ( [results] => 2 [total_results] => 2 [plans] => SimpleXMLElement Object ( [plan] => Array ( [0] => SimpleXMLElement

如何获得计划的价值,从中获得的金额,有人能帮我吗

通过XPath


在建议的xpath旁边,手册中有一些基本示例,这些示例对于理解simplexml的工作原理非常有帮助。
SimpleXMLElement Object ( 
  [results] => 2 
  [total_results] => 2 
  [plans] => SimpleXMLElement Object ( [plan] => Array ( [0] => SimpleXMLElement Object ( [id] => 1014 [type] => paid [name] => Silver [amount] => 1000.00 [interval] => 30 [notification_url] => http://www.google.com [free_trial] => 0 [occurrences] => 1 [num_customers] => 0 [status] => active ) [1] => SimpleXMLElement Object ( [id] => 1013 [type] => paid [name] => Gold [amount] => 500.00 [interval] => 30 [notification_url] => http://www.movebyu.com/ExpressEngine/index.php/?ACT=21 [free_trial] => 0 [occurrences] => 1 [num_customers] => 1 [status] => active ) ) ) 
),