Topic: Help with preg_replace
I am trying to add a new bbcode called [x]druvan@gmail.com[/x], what I want is, whatever value placed inside this code, should be turned into images, for example, email ids.
I created a function called imagize, which basically converts the given text into a png image file, then returns the file name. This part works OK.
Now, I added all this to parser.php file and
$text = preg_replace("#\[x\](.*?)\[/x\]#", "imagize('$1')", $text);
==> imagize('druvan@gmail.com')
I am not able to execute 'imagize' function, can someone help me.
Result <img src=imagize('$1') />