PHPackages                             waughj/html-attribute-list - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. waughj/html-attribute-list

ActiveProject[Utility &amp; Helpers](/categories/utility)

waughj/html-attribute-list
==========================

A list o’ HTML attributes for easy HTML generation.

v1.2.0(6y ago)03206AGPL-3.0-or-laterPHPPHP &gt;=7.2

Since Jun 3Pushed 6y agoCompare

[ Source](https://github.com/waughjai/html-attribute-list)[ Packagist](https://packagist.org/packages/waughj/html-attribute-list)[ RSS](/packages/waughj-html-attribute-list/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (11)Used By (6)

HTML Attribute List
===================

[](#html-attribute-list)

A list o’ HTML attributes for easy HTML generation.

Just create an instance with a hash map with attribute names as keys &amp; attribute values as values:

```
$attribute_list = new HTMLAttributeList
([
    'class' => 'footer',
    'id' => 'main-footer'
]);

```

&amp; using it as a string or calling getAttributesText() will automatically give you HTML code for the attributes, starting with a space.

Use like this:

`
