Daniel Brown wrote: ... Dan, I don't want to put a downer on things, especially considering the ammount of time/energy you spent writing the code you posted. ... but this is not exactly what I was looking for. I guess my feable attempt at explaining myself was rather off the mark. I'm looking for code that will take an HTML string and give me back a truncated string which still contains 'valid' HTML - the idea being to make an intro text from a longer article (that is stored as HTML). I'm a little confused why the html santizing couldn't be done with a simple strip_tags()? are we on the same page? have I missed something? rgds, Jochem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php