Re: Using PSpell to check an HTML document

From: Date: Tue, 29 Apr 2003 11:07:27 +0000
Subject: Re: Using PSpell to check an HTML document
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145630@lists.php.net to get a copy of this message
See fi this does what you want: <? $words = explode(' ',striptags($text)); ?> Justin French on 29/04/03 10:35 PM, OrangeHairedBoy (me@orangehairedboy.com) wrote: > I would like to be able to spell-check an HTML document...and I'm thinking > about using PSpell. But, I need to extract a list of words from the document > (while stripping out HTML tags), and put them into an array, which I would > then use on the PSpell program. > > Does anyone know how to do that? If I wasn't too clear, here's an example: > > <head> > <title>My Page</title> > </head> > <body> > <p>Paragraph 1</p> > <p>Paragraph 2</p> > </body> > </html> > > would be turned into an array I would use like: > > echo $words[0]; /* prints "My" */ > echo $words[1]; /* prints "Page" */ > echo $words[2]; /* prints "Paragraph" */ > echo $words[3]; /* prints "1" */ > echo $words[4]; /* prints "Paragraph" */ > echo $words[5]; /* prints "2" */ > > Thanks! > > Lewis > >

« previous php.general (#145630) next »