PHP code example of everton3x / html-object-model

1. Go to this page and download the library: Download everton3x/html-object-model library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

everton3x / html-object-model example snippets




eate
$entity = new HtmlObjectModel\Element('input');

// Configure
$entity->setAttribute('id', 'entity1')
    ->setAttribute('class', 'mystyle')
    ->setAttribute('name', 'myfield');

// Build
echo $entity->build();