I tried both createElement and create_element.
create_element - error is -
Call to undefined method DOMDocument::create_element()
createElement - error is -
This page contains the following errors:
error on line 2 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
createElement() is the method you should be using according to the PHP docs. That’s why I was wondering where the error message was picking up create_element() from.
Is it the issue for xampp ?
I think xampp might have some missing extension.
I checked and also I can see DOM/XML extension enabled. Do I need something else for DOMXML or thats it?
again, the error message you posted does not match the code you posted. check the file mentioned in the error message at the specified position (and around that, since the cause might be a couple of lines earlier).