0

我有ff:

stdClass Object
(
    [id] => 1
    [contest_id] => 520
    [type] => terms
    [name] => Terms and conditions
    [lang] => en_US
    [slug] => asdf
    [anchor_text] => 
    [title] => asdf
    [body] => 

    asdfasdfasdfasdf



    asdfasfasfsad



    asdfasdfasdfasdfasdf



    [created] => 2013-05-22 18:40:30
    [modified] => 2013-05-22 18:40:30
    [Media] => Array
        (
        )

)

我想获取每个值并通过 html 在页面中输出它们。

我如何获得ff?

<h1> Object[name] </h1>

<p> Object[body]</p>
and so on and so on...
4

1 回答 1

1

使用这个“->”来访问对象

<h1> $objectName->name </h1>

<p> $objectName->body</p>

等等等等...

于 2013-05-22T19:22:10.167 回答