preg_replace /e and array

obrienplum

New Member
why this code does not work ?\[code\]$mx['foo'] = "vvv";$string = "foo is foobar, baz is widgets";echo preg_replace("/(foo)/ei", "$mx[('\\1')]", $string );\[/code\]the output must like thisvvv is vvvbar, baz is widgets
 
Back
Top