htmlタグ付き出力テキストにどのように:DetalView Yii2:私はDetalViewウィジェットを使用して、私は<ВR>タグ必要
$string .= $item[$field] . ", ";
代わりにコンマ入力<ВRの場合:
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'information:ntext',
[
'attribute' => 'text',
'value' => $model->getUserAttributes('getScientificWorks', 'text'),
],
],
])
?>
getUserAttributesは、文字列を返します>の場合、テキストは次のようになります。 "テキスト.. <ВR> ..テキスト"