Daily Archives: March 22, 2013
HTML tags aware version of PHP substr
If you need a html-tags aware version of substr, this one should do the job. It works fine for me <?php /** * Truncates text. * * Cuts a string to the length of $length and replaces the last characters * with the ending if the text is longer than length. * * @param string […]