Question: Using PHP Write a function wordFilter ( $str ) that takes a string representing a sentence as a parameter. It should replace all occurrences of
Using PHP
Write a function wordFilter$str that takes a string representing a sentence as a parameter. It should replace all occurrences of certain blacklisted words with asterisks of the same length and return the substituted sentence. The words shootdarn and fudgecase insensitive are considered blacklisted. However, these words as part of a larger word should be left alone eg overshoot is fine as it is Use one or more regular expressions with replacements in your solutions eg pregreplace
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
