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