howlowck / html-builder
There is no license information available for the latest version (dev-master) of this package.
dev-master
2014-01-08 22:37 UTC
Requires
- php: >=5.3.0
- howlowck/support: *
- illuminate/support: ~4
This package is not auto-updated.
Last update: 2024-12-16 15:44:17 UTC
README
Include the Builder
use Howlowck\HtmlBuilder\Element;
Create Element
$form = new Element('form');
Add/Set Content
You can add a string.
$form->addContent('welcome!')
Or another element
$firstName = new Element('input');
$form->addContent($firstName);
Add/Set Attributes
You can set attributes or properties. The order is the order you add them.
$first_name->addAttribute('required');
$first_name->addAttribute(array('id'=>'first_name'));
Get HTML
$form->getHtml();