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, 2102🔥, 0💬
Popular Posts:
How to decode the id_token value received from Google OpenID Connect authentication response? Accord...
Where to find tutorials on API Management Services at Azure Portal? Here is a list of tutorials to a...
How to login to the Developer Portal internally by you as the publisher? Normally, the Developer Por...
How To Protect Special Characters in Query String in PHP? If you want to include special characters ...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...