PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Labas to All
I want to cut a text after 400 charachers, and display it.
However since my text also contains some HTML codes, 400 may contain some unclosed HTML tags
If you have any basic ides, you are more than welcome.
Thnx...
Last edited by dethron on Wed Dec 20, 2006 6:04 am, edited 1 time in total.
Excluding the HTML characters and counting required characters can be done by converting HTML chars to HTML special chars. While counting each characters, just ignore those HTML special characters.but taking those special characters and not counting them. I think that can be achieved using regular expression.