How to use word limit


<?php
echo mb_strimwidth("Hello World", 0, 10, "...");

//Output: Hello W...

Note:- if intl extension is commented in php.ini file then You need to enable the intl extension in php just as the error says. In your php.ini file, uncomment the line extension=php_mbstring.dll or something like this.

Advertisements