$val) { $string = str_replace("{{" . $key . "}}", $val, $string); } return $string; } }