library/Haste/Util/DOMUtil.php
public static function createAttributes($attributes = [])
    {
        $list = [];

        foreach ($attributes as $key => $value)
        {
            $list[] = sprintf('%s="%s"', $key, is_array($value) ? implode(' ', $value) : $value);
        }

        return implode(' ', $list);
    }
public static function createAttributes($attributes = [])
    {
        $list = [];

        foreach ($attributes as $key => $value)
        {
            $list[] = sprintf('%s="%s"', $key, is_array($value) ? implode(' ', $value) : $value);
        }

        return implode(' ', $list);
    }
public static function createAttributes ( $ attributes = [ ] ) { $ list = [ ] ; foreach ( $ attributes as $ key => $ value ) { $ list [ ] = sprintf ( '%s="%s"' , $ key , is_array ( $ value ) ? implode ( ' ' , $ value ) : $ value ) ; } return implode ( ' ' , $ list ) ; }
Create tag attributes from an array

@param array $arrAttributes The tag attributes

@return string The attributes as string key="value" key1="value1"
Create tag attributes from an array