Php code to replace bad words in a document with *** and maintain break line

There were two examples of searches you could do yourself to find a pre-made solution:-

The first one involves APIs which you have dismissed.
The second involves libraries which may suit you better.
If Googling things for yourself is beyond the effort you are prepared to make, there were some library solutions linked in the topic I linked to in post #5 (which was a big part of the reason I linked to it).

6 Likes