08/01
2014
use Howlowck\HtmlBuilder\Element;
, (*1)
$form = new Element('form');
, (*2)
You can add a string.
$form->addContent('welcome!')
, (*3)
Or another element, (*4)
$firstName = new Element('input'); $form->addContent($firstName);
You can set attributes or properties. The order is the order you add them., (*5)
$first_name->addAttribute('required'); $first_name->addAttribute(array('id'=>'first_name'));
$form->getHtml();