Is there a way to use html in php like in javascript, where I can do Element.append() or so. Like $html->body->header->append($menu)? Some class or something?
-
4Take a look at DOM, it's basically the same API that you know from JavaScript.Fabian Schmengler– Fabian Schmengler2013-02-13 13:57:54 +00:00Commented Feb 13, 2013 at 13:57
Add a comment
|
1 Answer
Look at the DOM in PHP. Basically, DOMDocument provides functions similar to the Javascript DOM ones, although the DOM is a bit more difficult/complex to use in PHP.