preg_replace php replace function code example
Example 1: preg_replace examples
$result = preg_replace(
array('/pattern1/', '/pattern2/'),
array('replace1', 'replace2'),
$string
);
Example 2: preg_replace examples
# Strip HTML tag
$result = preg_replace('#<span id="15">.*</span>#m', '', $string);