How can I trim the displayed text to a certain number of characters? I deduce through
for each ' . ( $post['text'] ). ' How can I trim the displayed text to a certain number of characters? I deduce through
for each ' . ( $post['text'] ). ' 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.
Source: https://ru.stackoverflow.com/questions/516818/
All Articles