Php- Show any text only 100 letters

## In a particular div by using this we can show only 100 letters and then ... in php by removing tags.


$product_description = html_entity_decode($product_description);

echo substr(strip_tags($product_description), 0, strrpos(substr(strip_tags($product_description), 0, 100), ' ')) . "..";

Leave a Comment