0
That my code is not returning the values $owner
and $mid
in function make_user()
Because?
preg_replace_callback('/(^|[^a-z0-9_])M([a-z0-9_]+)/i', function($matches, $owner, $mid) {
return $this->mark_user($matches, $owner, $mid);
}, $text);
add a larger context to this code
– gpupo
Because this would not be the right way to pass these values, where is the $Owner statement and $mid?
– Marcelo Aymone
From what I saw, you tried to create an anonymous function (lambda style) and within it you called another function, which makes no sense, you could have referenced the function itself. You need to reference the function like this: Function($Matches) use($Owner, $mid) etc...
– Marcelo Aymone