回调函数 use

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         );

 

posted @ 2014-04-08 13:39  siyed  Views(126)  Comments(0Edit  收藏  举报