How to remove new line character?
Please check the following text file:
As you can see, it seems to have two lines as follows:
Now, please download that text file and open it with Notepad (To download it, you can use "save page as" feature of the browser). You will see that it seems to have one line but there is an invisible new line character between 1 and 2. How can I remove this hidden character from this file using str_replace()?
I tried the following separately with no success:
Thanks for any ideas.
$file_content = str_replace(PHP_EOL, '', $file_content);
$file_content = str_replace('\r', '', $file_content);
$file_content = str_replace('\n', '', $website_content);