create_function ('/\:([a-z_]+)/', "\$rep['$1']", $array[$key]))
create_function ('/\:([a-z_]+)/', "\$rep['$1']", $array[$key]))
//tu coś robimy z $match return $tu_cos_zwracamy; },$przeszukiwany_string);
preg_replace_callback('/\:([a-z_]+)/', function ($match) use ($rep) { return $rep[$match[1]]; }, $array[$key]);