Hi,
Please check the following text file:
As you can see, it seems to have two lines as follows:Code:http://www.configureweb.com/test.txt
1
2
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.PHP Code:$file_content = str_replace(PHP_EOL, '', $file_content);
$file_content = str_replace('\r', '', $file_content);
$file_content = str_replace('\n', '', $website_content);



Reply With Quote




Bookmarks