Good day.
We have code:
function testfunc($text){
return $text;
}
$text = "Simple text {testfunc(1)} and next simple text and we {testfunc(20)} are happy ";
// number in {testfunc()} only for example - it can be other number or text.
Tell me please how replace {testfunc(1)}
on result function testfunc($num)?
P.S.: In result need get next text:
$text = "Simple text 1 and next simple text and we 20 are happy ";