Re: [PHP-DB] Read more link with HTML code

2007-05-08 Thread Mike van Hoof
Hello: EG: iThe community of Gbongay, Sierra Leone, suffered greatly after the country's civil war, and had aspirations of starting a beekeeping operation to improve their situation. That's when they turned to NABUUR for assistance. But with Neighbours living all over the world and a

Re: [PHP-DB] Read more link with HTML code

2007-05-08 Thread Chris
Mike van Hoof wrote: Hello list, I got a problem with displaying content in a read more block which contains HTML code. The problem is as followes: I got a large piece of content, which contains HTML code (bui etc), but after 200 characters a read more link appears. At the moment I strip

Re: [PHP-DB] Read more link with HTML code

2007-05-08 Thread Chris
Chris wrote: Mike van Hoof wrote: Hello list, I got a problem with displaying content in a read more block which contains HTML code. The problem is as followes: I got a large piece of content, which contains HTML code (bui etc), but after 200 characters a read more link appears. At the

Re: [PHP-DB] Read more link with HTML code

2007-05-08 Thread Mike van Hoof
Hey, thanks for the help everyone, but after reading all the answers i decided to do some regexp thingies. Came up with this: function readMore_closedtags($text, $length) { preg_match_all('/(.*?)/s',substr(stripslashes($text), 0, $length),$out); foreach($out[1] as $key2 =

Re: [PHP-DB] Read more link with HTML code

2007-05-07 Thread James Gadrow
Hmmm... Perhaps you should think about separating the tags from the content? Do something like: //Strip tags from content and add a few char hook to be used for re-insertion //Count 200 chars (ignoring any hooks found while parsing and thereby not adding it to the char count) //Make sure