What function can be used to remove specific characters from a variable in PHP?

To remove specific characters from a variable in PHP, you can use the `str_replace()` function. This function allows you to specify the characters you want to remove and replace them with an empty string. By using `str_replace()`, you can easily clean up a string by removing unwanted characters.

// Variable with unwanted characters
$string = "Hello, World!";

// Remove the comma from the string
$cleaned_string = str_replace(",", "", $string);

// Output the cleaned string
echo $cleaned_string;