PHPackages                             biggy905/php-generate-tags - 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. biggy905/php-generate-tags

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

biggy905/php-generate-tags
==========================

Generate tags

0.0.2(1y ago)15MITPHPPHP &gt;=8.2

Since Dec 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Biggy905/php-generate-tags)[ Packagist](https://packagist.org/packages/biggy905/php-generate-tags)[ RSS](/packages/biggy905-php-generate-tags/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP Generate Tags
=================

[](#php-generate-tags)

---

HTML tags source code generation based on configuration OOP.

### Installation

[](#installation)

```
composer require biggy905/php-generate-tags

```

### Basic usage

[](#basic-usage)

---

```
use GenerateTags\Tag;
use GenerateTags\TagRenderable;

$tag = new Tag('div');
$render = (new TagRenderable())
    ->addTag($tag)
    ->addContent('Hello world!')
    ->render();

echo $render;
/*
Output:
Hello world!
 */

$tag = new Tag('div');
$render = (new TagRenderable())
    ->addTag($tag)
    ->addContent('Best PHP')
    ->addAttributes(
        [
            'class' => 'container',
            'data-custom' => 'data',
        ]
    )
    ->render();

echo $render;
/*
Output:
Best PHP
*/
```

### Other usage

[](#other-usage)

---

```
$tagUl = new Tag('ul');
$tagLi = new Tag('li');
$tagA = new Tag('a');

$render = (new TagRenderable())
    ->addTag($tagUl)
    ->addAttributes(
        [
            'class' => 'page_list',
            'data-status' => 'show',
        ]
    )
    ->addContent(
        (new TagRenderable())
            ->addTag($tagLi)
            ->addAttributes(
                [
                    'class' => 'page_item',
                ]
            )
            ->addContent(
                 (new TagRenderable())
                    ->addTag($tagA)
                    ->addAttributes(
                        [
                            'href' => 'first.html',
                            'target' => '_blank',
                        ]
                     )
                     ->content('First Page')
                     ->render()
            )
            ->render(),
        (new TagRenderable())
            ->addTag($tagLi)
            ->addAttributes(
                [
                    'class' => 'page_item',
                ]
            )
            ->addContent(
                 (new TagRenderable())
                    ->addTag($tagA)
                    ->addAttributes(
                        [
                            'href' => 'second.html',
                        ]
                    )
                    ->addContent('Second Page')
                    ->render()
            )
            ->render(),
    )

    ->render();

echo $render;

/*
Output:

        First Page

        Second Page

*/
```

### Another usage

[](#another-usage)

---

```
use GenerateTags\Tag;
use GenerateTags\TagRenderable;

$tagRenderable = new TagRenderable();

$tagDiv = new Tag('div');
$tagSpan = new Tag('span');
$tagH3 = new Tag('h3');
$tapP = new Tag('p');

$items = [
    [
        'product' => 'Product 1',
        'price' => 3600,
    ],
    [
        'product' => 'Product 2',
        'price' => 4200,
    ],
    [
        'product' => 'Product 3',
        'price' => 1200,
    ],
];

$tagRenderableItems = [];
foreach ($items as $item) {
    $tagRenderableItems[] = $tagRenderable
        ->clear()
        ->addTag($tagDiv)
        ->addAttributes(
            [
                'class' => 'col-3',
            ]
        )
        ->addContent(
            $tagRenderable
                ->clear()
                ->addTag($tagH3)
                ->addAttributes(
                    [
                        'class' => 'text-center'
                    ],
                )
                ->addContent($item['product'])
                ->render(),
            $tagRenderable
                ->clear()
                ->addTag($tagP)
                ->addContent($item['price'])
                ->render(),
        )
        ->render();
}

$render = $tagRenderable
    ->clear()
    ->addTag($tagDiv)
    ->addAttributes(
        [
            'class' => 'container',
        ]
    )
    ->addContent(
        $tagRenderable
            ->addTag($tagDiv)
            ->addAttributes(
                [
                    'class' => 'row',
                ]
            )
            ->addContent(
                $tagRenderableItems
            )
            ->render();
    );

echo $render;
/*
output:

                Product 1

                3600

                Product 2

                4200

                Product 3

                1200

*/
```

### License

[](#license)

---

PHP Generate Tags is open-sourced software licensed under the [MIT license](https://mit-license.org/license.txt). Copyright © 2024.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance41

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

520d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e3be90656b733d49837acd8a6d57accaf81e771f4f0802f94358eb264b1e2bd?d=identicon)[Biggy905](/maintainers/Biggy905)

---

Top Contributors

[![Biggy905](https://avatars.githubusercontent.com/u/94367873?v=4)](https://github.com/Biggy905 "Biggy905 (8 commits)")

---

Tags

Php generate tags

### Embed Badge

![Health badge](/badges/biggy905-php-generate-tags/health.svg)

```
[![Health](https://phpackages.com/badges/biggy905-php-generate-tags/health.svg)](https://phpackages.com/packages/biggy905-php-generate-tags)
```

###  Alternatives

[michael-rubel/laravel-couponables

This package provides polymorphic coupon functionality for your Laravel application.

19590.7k1](/packages/michael-rubel-laravel-couponables)[loadsys/cakephp_sitemap

A CakePHP Plugin for adding automatic XML and HTML Sitemaps to an app

2819.6k](/packages/loadsys-cakephp-sitemap)[mauricerenck/komments

A comment and webmention plugin for Kirby 3

501.2k1](/packages/mauricerenck-komments)[myweb/show-out-of-stock-products

Show out-of-stock product configurations for configurable products on the front end.

131.7k](/packages/myweb-show-out-of-stock-products)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
