0

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?

1
  • 4
    Take a look at DOM, it's basically the same API that you know from JavaScript. Commented Feb 13, 2013 at 13:57

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.