PHP 4.0 Bug #5652 Updated:

From: Date: Tue, 18 Jul 2000 09:27:19 +0000
Subject: PHP 4.0 Bug #5652 Updated:
Groups: php.dev 
Request: Send a blank email to php-dev+get-24856@lists.php.net to get a copy of this message
ID: 5652 Updated by: david Reported By: christoffer@leitet.no Status: Closed Bug Type: Misbehaving function Assigned To: Comments: fclose() should be outside the while loop. the first parameter of ereg_replace is a string - the pattern to search for. fgets is returning one line each time so of course your print substr() is being called for each time around the while loop You want something like this: ... fputs($fp, "$domain\n"); $data = ""; while (!feof($fp)) { $data .= fgets($fp, 2048); } $test = str_replace("\n", " ", $data); Full Bug description available at: http://bugs.php.net/?id=5652

« previous php.dev (#24856) next »