Escaping escaped chars

From: Date: Thu, 20 Jun 2002 17:59:21 +0000
Subject: Escaping escaped chars
Groups: php.general 
Request: Send a blank email to php-general+get-103182@lists.php.net to get a copy of this message
Im trying to move some binary strings from mysql to postgresql, and the binary strings has escape chars '\' in them. I was told to double escape them like so -> '\\\' Here is what Im trying -> $data = '\0P Z\0<Îê˜Úµ'; // This is a representation from an mysql dump $data2 = str_replace('/\', '/\/\/\', $data); Im getting -> Unexpected character in input: '\' (ASCII=92) state=1 I guess my str_replace() isn't correct. Am I going about the right way to double escape them. Thanks. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/

« previous php.general (#103182) next »