I'm trying to shorten a string from the database to show it as a preview.
I use the left function to achieve this but I have HTML codes for special characters. Like ' for single quotes, ë for ë, etc. The string can also contain a link so the length of the preview isn't always the same and in some cases it returns the start of a bit of code.
This is just some sample text to show the 'problem&#...
This is just some <A HREF="http://www.valerysuper.be
Is there a simple way to shorten the "output" of the string?