PHP添加新的if语句并用逗号分隔返回的数据

时间:2011-05-26 15:23:00

标签: php vbulletin

我正在使用vbulletin,因为我必须这样做。我正在使用一个hack来返回用户ID,如果一个人感谢另一个人的帖子。问题是,当多个用户“感谢”作者时,没有逗号分隔用户ID。我已经隔离了创建列表的代码,需要帮助添加一个新的if语句,它将添加“,”btwn用户ID。

以下是创建列表的代码:

if ($this->post['post_thanks_amount'] > 0 && $this->thread['isdeleted'] == 0)
{
    $this->post['post_thanks_bit'] = fetch_thanks_bit($this->thread['forumid'], $thanks);
    $this->post['post_thanks_user'] = $post_thanks_user;
    $this->post['post_thanks_amount_formatted'] =
    vb_number_format($this->post['post_thanks_amount']);

    $post_thanks_box = fetch_post_thanks_template($this->post);
}

我知道第二个如果需要用“> 1”替换“> 0”但我迷失了,因为如何用“,”加入它们

感谢

编辑输出代码

<tr valign="top">
<td style="background:#E8E8E8;" colspan="2" class="alt1">
    <div>
        <a rel="nofollow" href="member.php?u=20420">ninja1</a>
        <a rel="nofollow" href="member.php?u=26154">testuser</a>
    </div>
</td>

0 个答案:

没有答案
相关问题