roblogger Posted January 25, 2009 Share Posted January 25, 2009 I'm trying to trim a html text to an exact lenght. I'm using strip_tags and strlen on the front page of jabulela.com but the text length is not always the same length, I mean thr rendered text. How to trim to an exact length? do you know any snippets ? Link to comment https://forums.phpfreaks.com/topic/142335-some-help-with-strip_tags-and-strlen/ Share on other sites More sharing options...
krv Posted January 25, 2009 Share Posted January 25, 2009 <?php $var = substr($foo,0,100); ?> change number values around but that will work Link to comment https://forums.phpfreaks.com/topic/142335-some-help-with-strip_tags-and-strlen/#findComment-745791 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.