Ben bu gibi bazı kod (bu basitleştirilmiş bir örnek) vardır:
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");
Bu çıkış olmalıdır
<li>This is a _testsome other stuff</li>
ama ben sadece almak
<li>This is a _test</li>
Neyi yanlış yapıyorum / ne tuhaf sözler php tanrıları yatıştırmak için gereklidir?