如何在php对象中获取键值对的值


How to get values of key value pairs in php object?

我有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...

使用这个"->"来访问对象

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