如何将HTML添加到PHP else代码中

时间:2015-11-16 20:44:47

标签: php html

如何制作"(@ count new)"以下代码中的文本以粗体格式显示?

else {
$text = format_plural($count, '1 new',
                    'Private Messages (@count new)');
}

以下是完整的代码段:

function bootstrap_primary_privatemsg_new_block($count) {
    $count = $count['count'];
    if ($count == 0) {
        $text = t('Private Messages');
    }
else {
$text = format_plural($count, '1 new',
                    'Private Messages (@count new)');
}
return l($text, 'messages', array('attributes' => array('id' => 'privatemsg-new-link')));
}

1 个答案:

答案 0 :(得分:0)

怎么样?
$text = format_plural($count, '1 new', 'Private Messages (<strong>@count new</strong>)');