In PHP my string looks like this: "{{edit(3)}}"
.
I would like the result to be: "open3close"
,
using preg_replace
or another method.
Any ideas?
In PHP my string looks like this: "{{edit(3)}}"
.
I would like the result to be: "open3close"
,
using preg_replace
or another method.
Any ideas?
I'm sorry if you wasted your time, i found a valid solution.
preg_replace("/{{edit((.*))}}/e","'open'.'\\1'.'close'", $string);
input : {{edit(3)}} output: open3close