Re: Windows/UNIX differences?

From: Date: Fri, 02 Nov 2001 22:04:10 +0000
Subject: Re: Windows/UNIX differences?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-73304@lists.php.net to get a copy of this message
are you using two single quotes when you want a double quote? also you should probably be using str_replace for this since there's no regular expressions here. On Fri, 02 Nov 2001 22:26:07 +0100, Ben Edwards wrote: >Have a regular expression which replaces ' with '' (used to insert ' >into db): > preg_replace("/\'/", "''", $text ); >This works great on the UNIX production machine but not on windows >development environment. Actually replaces ' with \'' not ''. > >Before I write a function that loops thought the whole thing looking >at >each character and replaces ' with '' has anybody got any ideas? > >Ben > >************************************************************** >* Ben Edwards +352 091 429995 * >* Homepage http://www.gifford.co.uk/~bedwards * >* i-Contact Progressive Video http://www.videonetwork.org * >* Smashing the Corporate image http://www.subvertise.org * >* Bristol's radical news >http://www.bristle.co.uk * >* PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * >************************************************************** > > -- Mark, maggelet@mminternet.com on 11/02/2001

« previous php.general (#73304) next »