[thelist] replacing whacks in PHP

NanHarbisonSmith at aol.com NanHarbisonSmith at aol.com
Sun Jul 7 17:14:01 CDT 2002

[ Picked text/plain from multipart/alternative ]
When you are entering the text to the database, you use the
addslashes() function:
$sometext = addslashes($sometext);
then when you retrieve it from the db, use the
$sometext = stripslashes($sometext);

In a message dated 7/7/2002 6:11:26 PM Eastern Daylight Time,
joel at spinhead.com writes:

> Writing to the db, I'm escaping the single and double quotes with whacks \
> When they come back from the db, there they are, large as life.
> How do I replace '\' with '' (nothing) ?
> I've looked at strtr, ereg_replace, str_replace - all I want is VBScript's
> simple 'replace' syntax.
> joel
> --

Nan Harbison Smith
481 Elm Street
Concord, MA 01742

Deja Moo -- the feeling that you've heard this bull before

More information about the thelist mailing list