Answer the question
In order to leave comments, you need to log in
Processing strings with html code in PHP?
Hello. It is necessary to process rows from the database, they contain html code, and the essence is that you need to look in the text for example divs with the example class, take their contents, process them and put them back. What is the most convenient way to implement this in PHP, only fiddling with regular expressions in html code?
Answer the question
In order to leave comments, you need to log in
No, it is difficult to do this with regular expressions, and in some cases it is impossible at all.
Choose one of the parsers . DiDom, dom-crawler or zend-dom for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question