KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there any way I can insert an HTML template to existing DOMNode without content being encoded? I have tried to do that with: $dom->createElement('div', '<h1>Hello world</h1>'); $dom->createTextNode('<h1>Hello world</h1>'); The output is pretty much the same, with only difference that first code would wrap it in a div. I have tried to loadHTML from string but I have no idea how can I append it's body content to another DOMDocument. In javascript, this process seems to be quite simple and obvious.
Tags (comma-separated)
Save Edits
Cancel