Ben Edwards <[EMAIL PROTECTED]> 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?
rather than preg_replace behaving differently on windows and unix, it
seems more likely that your windows install of php has
'magic_quotes_gpc' set on in php.ini, and the unix install has it set to
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]