Answer the question
In order to leave comments, you need to log in
How to implement div parsing in PHP?
Hello! I need to parse prices from one site, which are in divs with identifiers. div's are absolutely different, but numbers.
How is it more convenient to implement this?
I just came up with the idea of making an array of div identifiers and parsing them in a loop.
Is there any way to do it less costly?
Answer the question
In order to leave comments, you need to log in
google -> "php html parser" -> for example Simple HTML DOM Parser
PHP has a class, a set of DOM classes that can be used to process xml (including html). To search, you need DOMXPath. www.php.net/manual/en/class.domxpath.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question