2012-08-02 151 views
0
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))) 
), 

如何获取计划的值,金额来自这些,任何人都可以帮助我?如何从SimpleXml对象中获取值

+0

旁边的建议的XPath手动具有非常有助于了解如何simplexml的作品的一些基本的例子。 http://ie2.php.net/manual/en/simplexml.examples.php – hakre 2012-08-02 10:11:48

回答