php后向引用怎么带入到函数参数
preg_replace('/{get_(\w+)}/',$arr[$1], $content);
$1为后向引用,我需要把匹配的 \w+ 作为参数,传入到自定义函数,或者作为数组的索引,该怎么实现呢
------解决思路----------------------preg_replace('/{get_(\w+)}/e','$arr["$1"]', $content);
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn