Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $array = array('dave gupta', 'stephen gupta', 'rajni goel');
- function removeText($input, $text)
- {
- $result = array();
- foreach($input as $stmt)
- {
- $result[] = trim(str_replace($text, '', $stmt));
- }
- return $result;
- }
- print_r(removeText($array, 'gupta'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement