Answer the question
In order to leave comments, you need to log in
How to display part of text in Yii2?
With the help of active record, using the following code - , we display the text of the post from the database.
How to make Yii2 output only part of the text? For example, only 400 characters. = $orders->post
Answer the question
In order to leave comments, you need to log in
\yii\helpers\StringHelper::truncate('Текст который нужно обрезать',150,'...');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question