substr() help

From: Date: Fri, 07 Feb 2003 17:05:56 +0000
Subject: substr() help
Groups: php.general 
Request: Send a blank email to php-general+get-134754@lists.php.net to get a copy of this message
working on a peice of code that should be pretty easy, but for some reason I am not getting any results. I want the first 10 characters of each line from the file I am reading and am using this code: $temp = str_replace("\n", "", fgets($fp, 4096)); $line = substr ($temp, 0, 5); when I test for temp I get 30 responses - which is correct, but when I test for $line I get Zero responses. Did I make a mistake in my code Paul Reilly reilly@wt.net

« previous php.general (#134754) next »