From e7b3717614621f14695ab6ca6dda6dd17ba3d65c Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 28 Jul 2011 20:27:23 +0000 Subject: added new easygiant library --- h-source/Library/Functions.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'h-source/Library/Functions.php') diff --git a/h-source/Library/Functions.php b/h-source/Library/Functions.php index 8384580..705c1c0 100755 --- a/h-source/Library/Functions.php +++ b/h-source/Library/Functions.php @@ -207,7 +207,18 @@ function wrap($string,$tag_class) {#wrap the string with the tag and its class if (is_array($tag_class)) { foreach ($tag_class as $tag => $class) { $tag = str_replace('+','',$tag); - $str_class=isset($class) ? " class=\"".$class."\"" : null; + if (!is_array($class)) + { + $str_class=isset($class) ? " class=\"".$class."\"" : null; + } + else + { + $str_class = null; + foreach ($class as $attr => $val) + { + $str_class .= " ".$attr."='".$val."' "; + } + } $str_front.="<".$tag.$str_class.">\n"; $str_rear.="\n"; } -- cgit v1.2.3