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? Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.