What are the implications of using the "\r" character in PHP scripts, especially in the context of text manipulation and output formatting?

Using the "\r" character in PHP scripts can cause issues with text manipulation and output formatting, especially when dealing with line breaks. To solve this issue, you can use the PHP function `str_replace()` to replace all occurrences of "\r" with an empty string, effectively removing it from the text.

// Example PHP code snippet to remove "\r" characters from a string
$text = "Hello\rWorld";
$cleaned_text = str_replace("\r", "", $text);
echo $cleaned_text;