Hello folks I am new to PHP and looking for a code which will allow me to limit the lenghts of lines.
I am using a table 190.px wide and if the content of the table is too long i want the PHP code make it appear like this
text text text text text text text text text text [...]
Can anyone help me with this please..
Thanks
Line lenght limitations
Moderator: General Moderators
e.g.http://www.php.net/manual/en/function.strlen.php
http://www.php.net/manual/en/function.substr.php
Code: Select all
if (strlen($text) > 30)
$text = substr($text, 0, 30) . 'ї...]';
echo $text;http://www.php.net/manual/en/function.substr.php