What are common methods in PHP to manipulate strings, such as removing specific substrings like in the given example?
To remove specific substrings from a string in PHP, you can use functions like `str_replace`, `preg_replace`, or `substr_replace`. These functions allow you to replace or remove specific substrings based on patterns or positions within the string. In the given example, we can use `str_replace` to remove the substring "world" from the input string.
$input = "Hello, world!";
$substring = "world";
$output = str_replace($substring, "", $input);
echo $output; // Output: Hello, !