In order to print_r
a collapsable tree, I\'m currently using his code which uses preg_replace()
and the /e
modifier, which is depreciated
You need to concat the variable $id value, try this:
function callbackFunction($matches) {
$id = substr(md5(rand().$matches[0]), 0, 7);
return "$matches[1]$matches[2]'";
}
讨论(0)