Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Remove the New Line Character from the End of a Text Line
How To Remove the New Line Character from the End of a Text Line? - PHP Script Tips - PHP Built-in Functions for Strings
✍: 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); ?>
2007-04-22, 4718👍, 0💬
Popular Posts:
What Is a CAPTION Tag/Element? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells A "capti...
What is the difference between "calloc(...)" and "malloc(...)"? 1. calloc(...) allocates a block of ...
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
Are risk constant through out the project ? * Never say that risk is high through out the project. R...
.NET INTERVIEW QUESTIONS - Can we use events with threading ? Yes, you can use events with thread; t...