-2

关于如何使用 PHP 从这个数组中检索 email1@some.com、email2@some.com、email3@some.com、email4@some.com 和 email5@some.com 的任何想法?

Array
(
    [0] => SimpleXMLElement Object
        (
            [0] => email1@some.com
        )

    [1] => SimpleXMLElement Object
        (
            [0] => email2@some.com
        )

    [2] => SimpleXMLElement Object
        (
            [0] => email3@some.com
        )

    [3] => SimpleXMLElement Object
        (
            [0] => email4@some.com
        )

    [4] => SimpleXMLElement Object
        (
            [0] => email5@some.com
        )
)

谢谢

4

1 回答 1

2
<?php
foreach ($array as $item) {
    $email = $item[0];
    // Do something with $email
}
?>
于 2013-02-25T16:28:06.180 回答