PHP code example of alius / tag

1. Go to this page and download the library: Download alius/tag 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/ */

    

alius / tag example snippets


$tag->attr('foo', true); // <div foo="1"></div>
$tag->getAttr('foo'); // true

$tag->attr('foo', '"foo" \'bar\' <script></script>'); // <div foo="&quot;foo&quot; 'bar' &lt;script&gt;&lt;/script&gt;"></div>
$tag->getAttr('foo'); // "foo" 'bar' <script></script>