Php 在帖子数量旁边添加单词(帖子)
我猜下面的代码显示了用户名和用户写的帖子数量。 它是这样显示的:例如 穆罕默德(23岁) 我希望它是这样的:例如 穆罕默德-(23个员额) 我该怎么做Php 在帖子数量旁边添加单词(帖子),php,Php,我猜下面的代码显示了用户名和用户写的帖子数量。 它是这样显示的:例如 穆罕默德(23岁) 我希望它是这样的:例如 穆罕默德-(23个员额) 我该怎么做 $html = ''; if ($link) $html .= '<a href="'. $link .'" title="'. $title .'">'; $html .= '<span class="avatar" title="'. $title .'">'. $avatar .'</s
$html = '';
if ($link) $html .= '<a href="'. $link .'" title="'. $title .'">';
$html .= '<span class="avatar" title="'. $title .'">'. $avatar .'</span>';
if ($this->show_name || $this->show_bbpress_post_count || $this->show_postcount)
$html .= '<span class="name">'. $name . '</span>';
if ($link) $html .= '</a>';
if ($email) $html .= '<div class="email">'. $email .'</div>';
if ($biography) $html .= '<div class="biography">'. $biography .'</div>';
$tpl_vars['{class}'] = implode($divcss, ' ');
$tpl_vars['{user}'] = $html;
或
$name=''$名称。“”;
在哪里生成$name
变量?这就是神奇发生的地方,而不是在你共享的代码中。你的意思是:$name.=sprintf(“(%d)”$postcount);请把它附在你的问题后面。不,我的意思是像这样的代码
$name = "";
if($this->show_name)
$name = $user->display_name;
$name = '<strong>'. $name .'</strong>';