Using PSpell to check an HTML document
| From: | OrangeHairedBoy | Date: | Tue, 29 Apr 2003 11:35:05 +0000 |
| Subject: | Using PSpell to check an HTML document | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145628@lists.php.net to get a copy of this message | ||
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