| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #2 (permalink) |
| Senior Member Join Date: Aug 2005 Location: United Kindom
Posts: 1,502
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | If you are getting it out out a db, Make a function called profanityFilter($text) { } and then inside it, do a foreach($text as $value) { } and then get from a db like while($row=mysql_fetch_array($query)) { } and inside that do: str_ireplace($row['badword'], $row['replacewith'], $value); Then it will be done.. An example is shown below: PHP Code: Edit, Another way: PHP Code: If this helped you, Please leave rep, Thanks
Last edited by localhost; 08-15-2007 at 01:47 PM.
Reason: SMALL typo
|
| |