Why does preg_replace_callback never fire in this function?

Your function needs to return the data, not echo it..

function doReplace($matches) {
    return "This is the doReplace";
}

Hope that helps..

Leave a Comment