이 간단한 코드를 몇 가지 코드가 있습니다 :preg_replace_callback에서 콜백 함수 지정?
function callback_func($matches) {
return $matches[0] . "some other stuff";
}
function other_func($text) {
$out = "<li>";
preg_replace_callback("/_[a-zA-Z]*/","callback_func",$desc);
$out .= $desc ."</li> \r\n";
return $out;
}
echo other_func("This is a _test");
<li>This is a _testsome other stuff</li>
하지만 그냥
<li>This is a _test</li>
무엇을하고 있어요? 틀린/phiz 신을 달래기 위하여 무슨 기괴한 주문이 요구됩니까?
죄송합니다. 새로 고침해야합니다. 네가 한 직후에 그것을 알아 냈어. 어쨌든 고마워. –