|
Posted by anders on 01/10/08 09:44
try
$content=str_replace("\\'", "'\'", $content);
// Anders
On 10 Jan, 09:19, jodleren <sonn...@hot.ee> wrote:
> Hi all
>
> I have text area, where I can edit files - but I have to correct the
> returned data, for that I use
>
> $content=str_replace('\"', '"', $content);
> and
> $content=str_replace('\\', '\', $content);
>
> by some reason the latter one causes an error: syntax error,
> unexpected T_VARIABLE in....
> Replacing :-) it by
>
> $content=str_replace("\\\\", "\\", $content);
>
> and it works
>
> what is wrong with '\\' ?
>
> WBR
> Sonnich
Navigation:
[Reply to this message]
|