Tools, FAQ, Tutorials:
Remove Trailing New Line Character in PHP
How To Remove the New Line Character from the End of a Text Line?
✍: FYIcenter.com
If you are using fgets() to read a line from a text file, you may want to use the chop() function to remove the new line character from the end of the line as shown in this PHP script:
<?php $handle = fopen("/tmp/inputfile.txt", "r"); while ($line=fgets()) { $line = chop($line); # process $line here... } fclose($handle); ?>
⇒ Removing Leading and Trailing Spaces in PHP
⇐ Ways to Remove Leading and Trailing White Spaces in PHP
2016-10-13, 1907🔥, 0💬
Popular Posts:
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...
What is Azure API Management Developer Portal Admin? The Developer Portal Admin is an Azure Web port...
How to use "xml-to-json" Azure API Policy Statement? The "xml-to-json" Policy Statement allows you t...
How to build a PHP script to dump Azure AD 2.0 Authentication Response? If you are use the Azure-AD-...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...