Show only 100 chars from huge text

<?php

                      if($product_details['description'] != "")

{
 echo substr(strip_tags(html_entity_decode($product_details['description'])), 0, strrpos(substr(strip_tags(html_entity_decode($product_details['description'])), 0, 100), ' ')) . "...";

}                   else{echo "N/A";}
 ?>

Leave a Reply

Your email address will not be published. Required fields are marked *