Forum Moderators: open
If you take a look at str_replace, you'll see the code, which is quite useful if you're trying to replace multiple things with multiple things which may contain other things that could be misconstrued as one of the original things by the interpreter (confusing, I know ;-)). There's an example in the code, but I'd just thought I'd throw that out there. It's especially useful for replacing text with HTML image tags, like one might for emoticons.
I'm a little worried that the PHPJS library doesn't tuck all its functions into an object namespace - I wonder if it will conflict with built-in prototypes, or other libraries? I'm already using one kit that hijacks the root scope (it's Mootools - but that's one of the reasons I like using it). I don't mind adding another, as long as the two can play nicely together.
Good find! thanks!
Clicky [kevin.vanzonneveld.net]