|
Posted by windandwaves on 11/08/07 22:13
On Nov 7, 10:21 am, Michael Fesser <neti...@gmx.de> wrote:
> .oO(windandwaves)
>
> >Why is this so hard?
>
> >I can do a str_replace. That is easy. However, I do many of them AND
> >I want to make sure that one replacement does not override another...
>
> >e.g.
> >statement 1 could be: replace "cats" with "dogs"
> >statement 2 could be: replaced "do" with "did"
>
> >as you can see, this could turn "cats" into "didgs"
>
> >That is what is the hard part.
>
> That's why I suggested to give strtr() a try, which should avoid this
> problem.
>
> Micha
Hi Micha
>From what I understand strtr only replace characters, not sentences,
so I am not sure if that would work.
Cheers
Nicolaas
[Back to original message]
|