note 75548 rejected from function.ereg-replace by tularis

From: Date: Tue, 05 Jun 2007 06:33:20 +0000
Subject: note 75548 rejected from function.ereg-replace by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127213@lists.php.net to get a copy of this message
Note Submitter: xenleire at gmail dot com ---- how do you replace multiple adjacent newlines to a single newline? this doesn't work: $variable = str_replace("(\r\n)+", "\n", $variable); $variable = str_replace("(\n+", "\n", $variable);

« previous php.notes (#127213) next »