I need some php code.
I only know the basics of PHP and need what hopefully might
just be a few lines of code.
I would be grateful if someone could supply.
(My head is spinning with ereg pattern matching)
The requirement:
--------------------------------------------------------
I have a string which can contain any number of 'tokens'.
A token is text enclosed by {}
So for example
==> Hello {abc}, goodbye {def}
I want to remove the {} and replace each token
with a string derived from the token.
So I end up with
==> Hello xxx, goodbye yyy
where xxx = function (abc)
yyy = function (def)
--------------------------------------------------------
Thanks
I only know the basics of PHP and need what hopefully might
just be a few lines of code.
I would be grateful if someone could supply.
(My head is spinning with ereg pattern matching)
The requirement:
--------------------------------------------------------
I have a string which can contain any number of 'tokens'.
A token is text enclosed by {}
So for example
==> Hello {abc}, goodbye {def}
I want to remove the {} and replace each token
with a string derived from the token.
So I end up with
==> Hello xxx, goodbye yyy
where xxx = function (abc)
yyy = function (def)
--------------------------------------------------------
Thanks