CR at the end of line !



Hello !
I load lines written sequentially in a text file with this php command :
$line=fgets($fp,4096);
but I collect also the expected 'xOA' character at the end of the file
line ; how can I get rid of this nasty CR char ? ; I tried rtrim
unsuccessfully so far with this command ! :
$aa=rtrim($line);
Regards

.



Relevant Pages

  • Re: CR at the end of line !
    ... I load lines written sequentially in a text file with this php command: $line=fgets; but I collect also the expected 'xOA' character at the end of the file line; how can I get rid of this nasty CR char? ... Windows uses two characters for definining newlines, ... you have a string with CRLF's, trimwon't recognize them as being one newline. ...
    (alt.php)
  • Re: CR at the end of line !
    ... I load lines written sequentially in a text file with this php command: $line=fgets; but I collect also the expected 'xOA' character at the end of the file line; how can I get rid of this nasty CR char? ... Windows uses two characters for definining newlines, ... you have a string with CRLF's, trimwon't recognize them as being one newline. ...
    (alt.php)
  • Re: How to display a " in an input box
    ... without success. ... Isn't there something like the PHP command ... so that each character gets displayed properly? ... 'htmlentities' should do the job. ...
    (alt.html)