RE: [PHP] String Functions (replace)

2001-03-25 Thread Brooks, Ken
Nevermind, stumbled across addslashes(). What a wonderful language. :) -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] String Functions (replace) I know this is completely stupid but how

[PHP] String Functions (replace)

2001-03-25 Thread Brooks, Ken
I know this is completely stupid but how can i take something with a single quote ' and replace it in the string with \' Ex: Bain's Deli to Bain\'s Deli $fieldcontents = strtr($fieldcontents, "'", "\\\'"); -or- $fieldcontents = strtr($fieldcontents, "'", "\\'"); doesn't work. I feel dumb, but m