PHPackages                             fixmind/phptohtml - 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. fixmind/phptohtml

ActiveLibrary

fixmind/phptohtml
=================

Fast and easy html generator.

1.0.2(6y ago)034MITPHPPHP &gt;=5.3

Since Jul 10Pushed 6y agoCompare

[ Source](https://github.com/fixmind/phptohtml)[ Packagist](https://packagist.org/packages/fixmind/phptohtml)[ Docs](https://github.com/fixmind/phptohtml)[ RSS](/packages/fixmind-phptohtml/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Html Generator
==============

[](#html-generator)

```
// EXAMPLE 01
echo Html::ul()->li('first point')->getParent()->li('second point');

//
//     first point
//     second point
//

// EXAMPLE 02
echo Html::div()->h1('title')->addId('title')->getParent()
                ->p('just text')->addClass('normal')->addStyle(['color' => 'red']);
//
//     title
//     just text
//

// EXAMPLE 03
$html = Html::div()->addClass('box')
                    ->ul()
                        ->li('first')->getParent()
                        ->li('second')->getParent()
                        ->li('third')->getParent()
                    ->getFirst(2)
                        ->ul()
                            ->li('subFirst')->getParent()
                            ->li('subSecond');
echo $html;

//
//
//      first
//
//          second
//
//              subFirst
//              subSecond
//
//
//      third
//
//
```

Use Selector to modified
========================

[](#use-selector-to-modified)

```
// EXAMPLE 01
// $html from previous example
$html->selectorFirst('ul ul')->addClass('sub');
$html->selectorLast('ul ul li')->addId('subLastId');
echo $html;

//
//
//         first
//         second
//
//                 subFirst
//                 subSecond
//
//
//         third
//
//

// EXAMPLE 02
$html->selectorFirst('ul.sub')->li('subThird');
$html->selectorFirst('#subLastId')->addText('!!!');
echo $html;

//
//
//         first
//         second
//
//                 subFirst
//                 subSecond!!!
//                 subThird
//
//
//         third
//
//

// EXAMPLE 03
foreach($html->selector('ul') as $ul)
{
    $ul->addClass('myUl');
}
echo $html;

//
//
//         first
//         second
//
//                 subFirst
//                 subSecond!!!
//                 subThird
//
//
//         third
//
//
```

Show part of HTML
=================

[](#show-part-of-html)

```
// EXAMPLE 01
// $html from previous example
echo $html->selectorFirst('ul.sub')->render();

//
//     subFirst
//     subSecond!!!
//     subThird
//
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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 ~55 days

Total

2

Last Release

2445d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37ed65cf5153e0c8d9d555e7605690df93dcc54e9ad7d4994e216e957712c58b?d=identicon)[fixmind](/maintainers/fixmind)

---

Top Contributors

[![fixmind](https://avatars.githubusercontent.com/u/22333085?v=4)](https://github.com/fixmind "fixmind (11 commits)")

---

Tags

generatorhtmlselectorphphtmlphp2htmlphpToHtmlphpManageHtml

### Embed Badge

![Health badge](/badges/fixmind-phptohtml/health.svg)

```
[![Health](https://phpackages.com/badges/fixmind-phptohtml/health.svg)](https://phpackages.com/packages/fixmind-phptohtml)
```

###  Alternatives

[rumenx/php-sitemap

Framework-agnostic Sitemap generator for PHP, Laravel, and Symfony.

1.3k15.1k1](/packages/rumenx-php-sitemap)[okipa/laravel-table

Generate tables from Eloquent models.

56752.8k](/packages/okipa-laravel-table)[rct567/dom-query

DomQuery is a PHP library that allows easy 'jQuery like' DOM traversing and manipulation

134261.0k4](/packages/rct567-dom-query)[ultrono/laravel-sitemap

Sitemap generator for Laravel 11, 12 and 13

36412.6k6](/packages/ultrono-laravel-sitemap)[airmanbzh/php-html-generator

PHP html generator

7973.8k5](/packages/airmanbzh-php-html-generator)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

32157.4k](/packages/aspose-cloud-aspose-words-cloud)

PHPackages © 2026

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