"fdfd"); $ss=preg_replace_callback($pre, $aa[$1],$str) } aa是这个函数里的数组,,,我正则想用这个数组里的值去换,, preg_replace_callback就用这个,,不想用那个e修饰符 ,大伙说要怎么做"/> "fdfd"); $ss=preg_replace_callback($pre, $aa[$1],$str) } aa是这个函数里的数组,,,我正则想用这个数组里的值去换,, preg_replace_callback就用这个,,不想用那个e修饰符 ,大伙说要怎么做">
Home > Backend Development > PHP Tutorial > 正则-preg_replace_callback 怎么调用本函数的变量做替换值

正则-preg_replace_callback 怎么调用本函数的变量做替换值

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:31:07
Original
1175 people have browsed it

正则php

function cc(){
$str="123456789";
$pre="/([123]+)/";
$aa=array("123"=>"fdfd");

$ss=preg_replace_callback($pre, $aa[$1],$str)

}

aa是这个函数里的数组,,,我正则想用这个数组里的值去换,,

preg_replace_callback就用这个,,不想用那个e修饰符

,大伙说要怎么做

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template