Results 1 to 6 of 6
Mar 5, 2013, 08:14 #1
- Join Date
- Nov 2009
- 0 Post(s)
- 0 Thread(s)
How to remove new line character?
Please check the following text file:
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:
$file_content = str_replace(PHP_EOL, '', $file_content);
$file_content = str_replace('\r', '', $file_content);
$file_content = str_replace('\n', '', $website_content);