Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

trimlink

Prevent strings from growing to long and breaking the layout.
This function will trim the string $text to the number of chars given by the $length.

trimlink

Quote

trimlink ( string $text, int $length )


Parameters
text
String to trim.

length
Max length of the string

Return Values
Return the string trimmed to the given length

Example
Code
<?php
$text = "The big brown fox jumped over the lazy dog";
echo trimlink($text, 10);
echo trimlink($text, 20);
?>


Output

Quote

The big br...
The big brown fox ju...