help with php5 error
Posted: Sat Feb 20, 2016 11:48 am
I got an error saying: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in
Can someone help me with this code:
Can someone help me with this code:
Code: Select all
function __($text, $array) {
$text = preg_replace("/\{(\w+)\}/e", "\$array[strtolower('$1')]", $text);
return $text;
}