[text]<h1><a id="blah">Blah</a></h1>[/text]
to:
[text]<a id="blah"></a><h1>Blah</h1>[/text]
There may be between zero and a zillion such instances in any given document. The document's contents are already loaded into a string in my script and I am using the simple html dom script (class? both?) for another purpose in the script. Attempts I have made to re-use the object, however, have resulted in errors indicating that maybe what I thought was an object, isn't (object-oriented stuff is still rather confusing to me--the one class I took in PHP years ago really didn't cover it very well).
I get the idea that it probably has something to do with traversing the DOM tree, but I really have no idea how to do that, even after reading documentation. Any assistance with figuring this out (especially examples
--Erika