我将如何在PHP中打印它

时间:2013-04-08 20:59:39

标签: php arrays class object echo

stdClass Object
(
    [entities] => stdClass Object
        (
            [urls] => Array
                (
                    [0] => stdClass Object
                        (
                            [url] => asdl;kfas.com
                            [expanded_url] => http://HOWDOIPRINTTHISURL.com
                            [display_url] => asdlkfsldfj.com
                        )

                )

        )

)

当我为我的变量$ fullurl执行print_r时,我得到上面的代码。如何打印标有“http://HOWDOIPRINTTHISURL.com”的部分?感谢

1 个答案:

答案 0 :(得分:2)

print $fullurl->entities->urls[0]->expanded_url;