How to Trim special Character \r in php
Can anybody tell me here how to trim the special character rn
or n in php? I know there is already trim function in php but that is not working.
While copying the email address from some other place and copying it into the excel field and during uploading i am getting the invalid email address error. But the email id is correct just due to the special character r
the error is showing. Any help will be appreciated.
Thanks in advance
From PHP docs for trim()
:
This function returns a string with whitespace stripped from the beginning and end of str. Without the second parameter, trim() will strip these characters:
" " (ASCII 32 (0x20)), an ordinary space.
"t" (ASCII 9 (0x09)), a tab.
"n" (ASCII 10 (0x0A)), a new line (line feed).
"r" (ASCII 13 (0x0D)), a carriage return.
"