What function can be used in PHP to replace specific characters within a string?
To replace specific characters within a string in PHP, you can use the `str_replace()` function. This function takes three parameters: the character(s) you want to replace, the character(s) you want to replace it with, and the string you want to modify. Example:
$string = "Hello, World!";
$new_string = str_replace(",", " ", $string);
echo $new_string; // Output: Hello World!