PHP - strip_tags() function to strip HTML from string

0 votes
265 views
added Sep 24, 2019 in PHP by lcjr First Warrant Officer (11,790 points)
//limit text up to 350 + strip the HTML
<?php echo substr(strip_tags($description),0,350); ?>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...