library/Helper/Html.php
public static function attributesToString($attributesArray)
    {
        if (!is_array($attributesArray) || empty($attributesArray)) {
            return false;
        }

        $attributes = array();

        foreach ($attributesArray as $attribute => $value) {
            if (!is_array($value) && !is_string($value) || !$value || empty($value)) {
                continue;
            }

            $values = (is_array($value)) ? implode(' ', array_unique($value)) : $value;
            $attributes[] = $attribute . '="' . $values . '"';
        }

        return implode(' ', $attributes);
    }
public static function attributesToString($attributesArray)
    {
        if (!is_array($attributesArray) || empty($attributesArray)) {
            return false;
        }

        $attributes = array();

        foreach ($attributesArray as $attribute => $value) {
            if (!is_array($value) && !is_string($value) || !$value || empty($value)) {
                continue;
            }

            $values = (is_array($value)) ? implode(' ', array_unique($value)) : $value;
            $attributes[] = $attribute . '="' . $values . '"';
        }

        return implode(' ', $attributes);
    }
public static function attributesToString ( $ attributesArray ) { if ( ! is_array ( $ attributesArray ) || empty ( $ attributesArray ) ) { return false ; } $ attributes = array ( ) ; foreach ( $ attributesArray as $ attribute => $ value ) { if ( ! is_array ( $ value ) && ! is_string ( $ value ) || ! $ value || empty ( $ value ) ) { continue ; } $ values = ( is_array ( $ value ) ) ? implode ( ' ' , array_unique ( $ value ) ) : $ value ; $ attributes [ ] = $ attribute . '="' . $ values . '"' ; } return implode ( ' ' , $ attributes ) ; }
Turn an array of HTML attributes into a string
@param string $content String to get HTML attributes from
@return array       Attributes
Turn an array of HTML attributes into a string