I was asked to close some of the “dangling” HTML tags, I have to use the PHP DOM extension and load the HTML.
I try to look for textbooks for a while, read this page , try different things, but I can't seem to figure out how to use it to achieve what I want.
I have this line: <div><p>The quick brown <a href="">fox jumps...
I need to write a function that closes open HTML tags.
Just look for a starting point here. Usually I can understand what is happening pretty quickly.
source
share