senyo Posted January 10, 2010 Share Posted January 10, 2010 I can get preg_match or preg_match_all to get the data from between <div class="description" style="margin-top: 20px;"> and <div class="clear"></div>, is preg_match the best way to get the data or there is a better way? Link to comment https://forums.phpfreaks.com/topic/187924-how-to-get-the-data-in-between-divs/ Share on other sites More sharing options...
cags Posted January 10, 2010 Share Posted January 10, 2010 It would depend on the exact structure of your input but you'd probably be better off with some sort of HTML document models/parsers such as xpath/DOMDocument. Link to comment https://forums.phpfreaks.com/topic/187924-how-to-get-the-data-in-between-divs/#findComment-992222 Share on other sites More sharing options...
senyo Posted January 10, 2010 Author Share Posted January 10, 2010 my input is an array Link to comment https://forums.phpfreaks.com/topic/187924-how-to-get-the-data-in-between-divs/#findComment-992231 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.