I have a problem about displaying HTML using data from MySQL.
I using tinyMCE, and content will save as HTML format.
When i want to display it on my browser it displays correctly.
BUT is not working properly when I try to limit 400 characters
Assume this code as MySQL content which i want to display:
<div class="someclass" >
this is content from MySQL
</div>
If limit to 20 characters, there will be no ending </div> and you can think what will happen without that </div>
If i understand correctly….
you can use the php function to limit the output
Edit :
to preserve HTML output
http://alanwhipple.com/2011/05/25/php-truncate-string-preserving-html-tags-words/