Location: PHPKode > scripts > Tag Builder > TagBuilder-Sample.php
<?php

/** @see FLY_TagBuilder */
require_once 'FLY/TagBuilder.php';


echo FLY_TagBuilder::CreateTagBuilder('a')
    ->addCssClass('computer current computer-laptop')
    ->addCssClass('computer-laptop sample')
    ->removeCssClass('computer sample')
    ->mergeAttribute('href', 'http://www.computer.com')
    ->mergeAttributes(array(
        'id'    => 'logo1',
        'title' => 'Notebook X',
        'style' => 'color: red; text-transformation: uppercase;'
    ))
    ->removeAttribute('style')
    ->setInnerHtml('A new Notebook here')
    ->toString();

/*- Will output:
<a id="logo1" class="current computer-laptop" href="http://www.computer.com" title="Notebook X">A new Notebook here</a>
*/
Return current item: Tag Builder