- str_replace: documentation ( source)
- preg_replace: documentation ( source)
<?php
$url = "meno go you to from";
$regexoo = array('to','go');
$text =str_replace($regexoo, '***', $url);
echo $text;
echo "<hr><br>";
$str = "first base baseball for all";
$pattern = '/\b(base|all)\b/i';
$str = preg_replace($pattern, "FOUND", $str);
echo $str;