首页 > 技术文章 > 回调函数 use

chuanheng 2014-04-08 13:39 原文

1 $info["fulltext"] = preg_replace_callback(
2                 $search2,
3                 function($matches) use ($search, $uniq) {
4                     return preg_replace($search,$uniq,$matches[0]);
5                 },
6                 $info["fulltext"]
7         );

 

推荐阅读