Re: [PHP] HTML text extraction

2009-08-21 Thread Manuel Lemos
Hello, on 08/18/2009 05:37 AM leledumbo said the following: > Usually, a website gives preview of its articles by extracting some of the > first characters. This is easy if the article is a pure text, but what if > it's a HTML text? For instance, if I have the full text: > > > bla bla bla >

Re: [PHP] HTML text extraction

2009-08-18 Thread Richard Heyes
HI, > ... The easy way (Back to the Future 2 anyone...?) would be to use strip_tags() first: http://uk.php.net/strip_tags -- Richard Heyes HTML5 graphing: RGraph - www.rgraph.net (updated 8th August) Lots of PHP and Javascript code - http://www.phpguru.org -- PHP General Mailing List (http:/

Re: [PHP] HTML text extraction

2009-08-18 Thread Ashley Sheridan
On Tue, 2009-08-18 at 01:37 -0700, leledumbo wrote: > Usually, a website gives preview of its articles by extracting some of the > first characters. This is easy if the article is a pure text, but what if > it's a HTML text? For instance, if I have the full text: > > > bla bla bla > > it

[PHP] HTML text extraction

2009-08-18 Thread leledumbo
Usually, a website gives preview of its articles by extracting some of the first characters. This is easy if the article is a pure text, but what if it's a HTML text? For instance, if I have the full text: bla bla bla item 1 item 2 item 3 and I take the first 40 characters,