Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function smartyMerge($string, $array) {
- $smarty = new Smarty();
- if (is_array($array) && count($array) > 0) {
- foreach ($array as $k => $v) {
- $smarty->assign($k, $v);
- }
- }
- return $smarty->fetch("eval:$string");
- }
Add Comment
Please, Sign In to add comment