I am Looking for a PHP solution that would allow creating HTML in the following style:
$head=new Head();
$title=new Title("The title of the page");
$head->setTitle($title);
$body=new Body();
$h1=new H(1,"Header 1");
$body->add($h1);
$html=new HTML();
$html->setHead($head);
$html->setBody($body);
echo $html->asHTMLString();
What PHP Libraries have a similar API?
I am not interested in “What is the best …?” just the fact that the API is comparable is what I’d like to know.
I do have a none OO version at this time that looks like this: