How do I use the DOM parser to extract the content of a html element in a variable.
More exactly: I have a form where user inputs html in a text area. I want to extract the content of the first paragraph.
I know there are many tutorials on this, but could not find any on extracting from variable and not a file(page)
Thanks