Re: addcslashes(), strange behavior
| From: | _lallous | Date: | Wed, 29 Aug 2001 10:55:03 +0000 |
| Subject: | Re: addcslashes(), strange behavior | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64974@lists.php.net to get a copy of this message | ||
You can't use "\10" it has no meaning.
Instead use this: "\x0A".
"Ben-Nes Michael" <miki@canaan.co.il> wrote in message
news:010901c1306a$97cc4da0$aa5796d4@canaan.co.il...
> Hi All
>
> I did
>
> echo ord ("\n");
> which return 10
>
> so I tried to do this with no success
> echo addcslashes ("hello\nworld", "\10");
> returning: "hello newline world"
>
> while doing:
> echo addcslashes ("hello\nworld", "\9");
> returned me what I wanted: "hello\nworld" which mean the string hold
> "hello\\nworld"
>
> Its look like a bug, ord say" /n = 10 while addsclashes replace /n using
/9
> as ASCII value.
> What is the list opinion ?
>
> --------------------------
> Canaan Surfing Ltd.
> Internet Service Providers
> Ben-Nes Michael - Manager
> Tel: 972-4-6991122
> http://sites.canaan.co.il
> --------------------------
>
>