what I\'m trying to do is make a \'jargon buster\'. Basically I have some html and some glossary terms in a database. When the person clicks on jargon buster it replaces the wor
I had this problem in JS getting individual words. What I did was the following (you can translate it from JS to PHP):
It actually works REALLY well for me. :)
var words = document.body.innerHTML; // FIRST PASS // remove scripts words = words.replace(/