protected function buildAttributes(array $attributes)
    {
        $html = [];

        foreach ($attributes as $key => $value) {
            $html[] = $key.'="'.$value.'"';
        }

        return count($html) ? ' '.implode(' ', $html) : '';
    }
protected function buildAttributes(array $attributes)
    {
        $html = [];

        foreach ($attributes as $key => $value) {
            $html[] = $key.'="'.$value.'"';
        }

        return count($html) ? ' '.implode(' ', $html) : '';
    }
protected function buildAttributes ( array $ attributes ) { $ html = [ ] ; foreach ( $ attributes as $ key => $ value ) { $ html [ ] = $ key . '="' . $ value . '"' ; } return count ( $ html ) ? ' ' . implode ( ' ' , $ html ) : '' ; }
Build HTML attributes.

@param array $attributes

@return string
Build HTML attributes .