/ Published in: PHP

Truncates the given string at the specified length.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Truncates the given string at the specified length. * * @param string $str The input string. * @param int $width The number of chars at which the string will be truncated. * @return string */ function truncate($str, $width) { }
Comments
