in my custom made cms, i need to replace part of the text that is selected from database table, that contains:
Lorem ipsum dolor sit amet, consectetur adipisicing elit {Block}'myfunc', array(11, 'thumbnail', 'large', 18){/Block} sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
part of the text with {Block}, shoud be replaced with php function that will execute function myfunc, and pass parameters that contains mentioned array.
bigest problem for me is that i don't know how many {Block} i will have in text, and where they will be placed.
i know that i can simply "explode" text, and do some gymnastics, but i don't know if it is best way to it.
i know this is not simple one... if you can help me with it, please.
thank you in advance!