2 November 2017

Get first n amount of characters from a string. You could use substr for that, but you will get empty results when there are special characters. Thus multibyte string method is the right way to go.

Source code viewer
  1. $string = mb_strimwidth($string, 0, 100);
Programming Language: PHP