PHPackages                             cautnew/phtml - 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. cautnew/phtml

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

cautnew/phtml
=============

An easy way to create and manipulate HTML tags

010PHP

Since Jun 17Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/cautnew/phtml)[ Packagist](https://packagist.org/packages/cautnew/phtml)[ RSS](/packages/cautnew-phtml/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHTML
=====

[](#phtml)

Overview
--------

[](#overview)

The `PHTML` class in PHP is designed to facilitate the creation of HTML tags using PHP objects. This class enables you to generate HTML tags dynamically, making it easier to build and manipulate HTML elements programmatically. You can change any part of your HTML before rendering the page without worrying about concats. One of the main features of this class is the ability to create a tag and change it's parameters and content with simple methods and avoiding concats and huge strings, only objects.

It's possible to write HTML as a string, *but why?*

Features
--------

[](#features)

- Simplifies the creation of HTML tags using PHP.
- Provides a clean and object-oriented way to generate HTML elements.
- Supports creating a variety of HTML tags.

Installation
------------

[](#installation)

To use the `PHTML` class, simply include the class file in your PHP project:

```
use PHTML/TAG;
```

Usage
-----

[](#usage)

### Creating a SCRIPT Tag

[](#creating-a-script-tag)

The `SCRIPT` object allows you to create a `` tag easily. Below is an example of how to use the `PHTML` class to generate a `` tag:

```
