how to replace ' character with character using preg_replace in php code example Example: php preg_replace function preg_replace($pattern, $replacement, $string);