Answer the question
In order to leave comments, you need to log in
How to get certain tags with certain attributes and content in these tags from all HTML code using PHP?
Good afternoon!
There is, for example, the following code: https://pastebin.com/CYGnAWVb.
This code is taken and inserted into the textarea in the form html. After that, this code should be processed so that it leaves the img tag with the header_subj_logo class (from line 142 of the code) + the contents of this tag
: this div: Clean up
all remaining code! How to do it? The output should get the cleaned up code in a variable, something like this:
<img class="header_subj_logo" src="/img/headers/en.png" style="float:right; height:100px; margin:5px">
<div class="prob_list">...</div>
Answer the question
In order to leave comments, you need to log in
if the tags you need are known, then use the Html parser, find and select exactly them
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question