本文整理汇总了PHP中SC::timeAgo方法的典型用法代码示例。如果您正苦于以下问题:PHP SC::timeAgo方法的具体用法?PHP SC::timeAgo怎么用?PHP SC::timeAgo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC
的用法示例。
在下文中一共展示了SC::timeAgo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
echo $membership->board->boardid;
?>
" class="boardset_board">
<div class="boardset_boardheader clearfix">
<div class="boardset_boardname">
<a href="<?php
echo SCRoutes::set("boards", "show", array("boardid" => $membership->board->boardid));
?>
"><?php
echo htmlspecialchars($membership->board->boardname);
?>
</a>
</div>
<div class="boardset_boardactivity">
<?php
echo $membership->board->lastpost ? "Last Post: " . SC::timeAgo(strtotime($membership->board->lastpost)) : "No threads yet";
?>
</div>
</div>
<?php
foreach ($membership->board->threads() as $thread_id => $thread) {
?>
<div class="boardset_boardthread clearfix">
<div class="boardset_boardthread_subject"> - <a href="<?php
echo SCRoutes::set("threads", "show", array("boardid" => $thread->boardid, "threadid" => $thread->messageid));
?>
"><?php
echo $thread->subject;
?>
</a></div>
<div class="boardset_boardthread_replies"><?php
示例2: timeAgo
public function timeAgo()
{
return SC::timeAgo($this->timestamp());
}