Guldstrand Posted January 2, 2015 Share Posted January 2, 2015 Can someone please, PLEASE explain to me how i can extract/parse all the text between the td-tags? Ex. Blyfri 95, 12,33 kr, 12,18 kr, - 10 öre, 30 dec <table class="table-standard" style="width: 90.05%; height: 209px;"> <thead> <tr> <th>Drivmedel</th> <th>Bemannad</th> <th> Obemannad</th> <th> <p>Senaste</p> <p><span style="background-color: #ededed;"> </span>ändring</p> </th> <th> Gäller fr.o.m.</th> </tr> </thead> <tbody> <tr> <td> Blyfri 95</td> <td> 12,33 kr</td> <td> 12,18 kr</td> <td><span> - 10 öre</span></td> <td> 30 dec</td> </tr> <tr> <td> Blyfri 98</td> <td> 12,83 kr</td> <td> 12,68 kr</td> <td> - 10 öre</td> <td> 30 dec</td> </tr> <tr> <td> Etanol E85</td> <td> 9,43 kr</td> <td> 9,28 kr</td> <td> + 10 öre</td> <td> 22 dec</td> </tr> <tr> <td> Diesel</td> <td> 12,62 kr</td> <td> 12,47 kr</td> <td> - 10 öre </td> <td> 30 dec</td> </tr> </tbody> </table> Thanks in advance... Link to comment https://forums.phpfreaks.com/topic/293607-parse-all-text-between-the-td-tags/ Share on other sites More sharing options...
.josh Posted January 2, 2015 Share Posted January 2, 2015 This question has been asked hundreds, if not thousands of times. Have you tried searching? Link to comment https://forums.phpfreaks.com/topic/293607-parse-all-text-between-the-td-tags/#findComment-1501553 Share on other sites More sharing options...
cyberRobot Posted January 5, 2015 Share Posted January 5, 2015 You could use PHP's DOMDocument class: http://php.net/manual/en/class.domdocument.php Link to comment https://forums.phpfreaks.com/topic/293607-parse-all-text-between-the-td-tags/#findComment-1501818 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.