How can I trim the displayed text to a certain number of characters? I deduce through

for each ' . ( $post['text'] ). ' 

    1 answer 1

    http://php.net/manual/ru/function.substr.php

     substr ( string $string , int $start [, int $length ] ) 

    From the documentation: Returns a substring of the string string starting with the start character on the account and length length characters. In your case: $ start - 0, $ length - the number of characters you want to display.