Vs: addslashes ()
| From: | Ville Mattila | Date: | Sat, 14 Oct 2000 11:00:49 +0000 |
| Subject: | Vs: addslashes () | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20140@lists.php.net to get a copy of this message | ||
Hi there,
I think the easiest way is just do it like this:
$a = "\'senthil\'"; // Now $a is 'senthil'
$a = "\"senthil\""; // Now $a is "senthil"
You should just add a \ -character before the special character. (For your information: this action
is called "escaping").
Ask more if you haven't understood or you have more problems in your mind.
- Ville
.............................................
Ville Mattila
Ikaalinen, Finland
> hello,
> i have a problem . i want to add slashes to my string
> $a = senthil ...i want it like 'senthil'
>
> i did $a=addslashes($a);
> but nothing worked ..
> 1.i have magic quotes = off..
> 2.is there a way to print ' and "
> senthil
>
>
>
>
>
> _________________________________________________
> Get Your Free Email At, http://www.rediffmail.com
>
> For fabulous shopping deals visit:
> http://www.rediff.co.in/shopping/index.html
>
>
>
>