PHP - strip_tags() function to strip HTML from string

0 votes
331 views
added Sep 24, 2019 in PHP by lcjr First Warrant Officer (11,760 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.
...