ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

[PHP] str_replace - is this even possible?

<< < (3/3)

Veign:
You are correct JoTo.  Not sure why I thought it would work.  Makes sense that it wouldn't.  Its loops through the already-replaced results looking to replace more items.  What they need is flag that would prevent an item from being replaced twice with the order of replace dictated by the order of the arrays passed into the function.

JoTo:
Hi Veign,

glad that you proofed it. I just thought i am too dumb again to use the str_replace function correctly and gave out a bad advise.

Happy replacing all :)
JoTo

RedPillow:
The <|/p> and <|p> tags somehow come from joining these two together:

$Firstpart[$rand] . $SecondPart[$rand];

Veign:
Nope.  Didn't come from joining.  Code constructs have no clue what HTML is.  The variable had to have already contained the information.

Navigation

[0] Message Index

[*] Previous page

Go to full version