我有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...
答案 0 :(得分:1)
使用此“ - &gt;”访问对象
<h1> $objectName->name </h1>
<p> $objectName->body</p>
依旧等......