<?php $str = "This is some text <p>##IDOBJECT=784##</p> and another some text <p>##IDOBJECT=1509##</p> <p>##LATESTARTICLESHOME=321##</p> <p align=\"center\">##IDOBJECT=321##</p>"; echo preg_replace_callback('/##(.*?)##/', function($match){ return strtolower('[object ' . $match[1] . ']'); }, $str);
You have javascript disabled. You will not be able to edit any code.