I have some code like this (this is a simplified example):
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");
The output of this should be
<li>This is a _testsome other stuff</li>
but I just get
<li>This is a _test</li>
What am I doing wrong/what bizarre incantation is required to appease the php gods?