[PHP] Re: Escaping a double-quote problem

2002-02-01 Thread Anton Kolev

oh yes

and I had some magic_quote_=Yes parameter set by default in php.ini :)

it's really not very smart to use it, it's very misleading
one can see hundreds websites, which fill s with backslashes on
re-submit to the same form

"Lerp" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Look up addslashes and stripslashes in the manual. Normally you'd use
> addslashes going into the db, and stripslashes coming out for display.
> HTH Joe :)
>
>
> "Anton Kolev" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Any idea why when I print the value of $text, I get a backslash in front
> of
> > the result?
> >
> > $text=preg_replace("/\"/", """, $text);
> > $text=preg_replace("/\"/", "A", $text);
> > $text=str_replace("\"", "A", $text);
> >
> > Contrary:
> >
> > $text=preg_replace("/&/", "&", $text);
> >
> > works quite well.
> >
> > cheerz
> >
> >
> >
>
>



-- 
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]




[PHP] Re: Escaping a double-quote problem

2002-02-01 Thread Lerp

Look up addslashes and stripslashes in the manual. Normally you'd use
addslashes going into the db, and stripslashes coming out for display.
HTH Joe :)


"Anton Kolev" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Any idea why when I print the value of $text, I get a backslash in front
of
> the result?
>
> $text=preg_replace("/\"/", """, $text);
> $text=preg_replace("/\"/", "A", $text);
> $text=str_replace("\"", "A", $text);
>
> Contrary:
>
> $text=preg_replace("/&/", "&", $text);
>
> works quite well.
>
> cheerz
>
>
>



-- 
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]