note 9087 modified in fgets by jmcastagnetto

From: Date: Mon, 16 Oct 2000 21:33:21 +0000
Subject: note 9087 modified in fgets by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-6532@lists.php.net to get a copy of this message
[Editor's note: A simpler solution is to use chop() or trim(), e.g.: $buffer = chop(fgets($fp, 4096)); will suffice.] To strip the newline caracter at the end of the string: $buffer = fgets($fp, 4096); $buffer=str_replace(chr(10),"",$buffer); $buffer=str_replace(chr(13),"",$buffer); http://www.php.net/manual/function.fgets.php

« previous php.notes (#6532) next »