我怎样才能得到数组的值

时间:2010-09-11 16:00:01

标签: xml arrays loops simplexml

我想获取“ListNumber”上的所有值,我如何使用php循环它?提前谢谢:)

   [ListNumbersList] => SimpleXMLElement Object
    (
        [Record] => SimpleXMLElement Object
            (
                [Returned] => 1
            )

        [ListNumber] => Array
            (
                [0] => 1
                [1] => 2
                [2] => 3
                [3] => 4
                [4] => 5
            )

    )

1 个答案:

答案 0 :(得分:0)

foreach($ listNumberList-> Listnumber as $ value) echo $ value;

尝试这个