Re: str_replace to ignore commas

From: Date: Tue, 06 Jan 2004 15:45:29 +0000
Subject: Re: str_replace to ignore commas
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173855@lists.php.net to get a copy of this message
Hello Vernon, Tuesday, January 6, 2004, 2:29:31 PM, you wrote: V> I'm trying to use str_replace to ignore sertain characters from a recordset V> field and it seems I am having difficulties with ignoring commas and V> carriage returns. I've gotten the following but when searching for, let's Nowhere in your replacement array do you check for, or remove, carriage returns. Add this \n to it: $replacement = array("\"", "\,", ".", "!", "?", "\n"); Your exploded array should now be correct. -- Best regards, Richard mailto:rich@launchcode.co.uk

« previous php.general (#173855) next »