Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

censorwords

This function will replace offensive words with the defined replacement word. The list of offensive words and the replacement word are both defined in the Miscellaneous Settings page in the Administration panel.

censorwords

Quote

censorwords ( $text )


Parameters
text
This is the text which should be censored

Return Values
censorwords() will return the string $text censored

Example
Code
<?php
// In this example we have added the word apple, orange and banana as offencive words and set replacement as ****.
 
$text = "The apple, orange and banana are all fruits.";
 
censorwords($text);
 
echo $text;
?>


Output from the Example

Quote

The ****, **** and **** are all fruits.