Need help to solve error like below,
preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in line 601
Got error in below code,
$string = preg_replace('~�*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
$string = preg_replace('~�*([0-9]+);~e', 'chr(\\1)', $string);
AM tried like.
$string = preg_replace_callback('~�*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))',function ($match) {
return ($match[1]);
}, $string);
But still got error like these?
Requires argument 2, 'chr(hexdec("\1"))'