php - Using a technick how can I get the following that they do not have any specific structure? -
from following html code not have specific structure plain , how can the: (below can find did using regex)
- 231435424
- 1800cc
- 163bhp
- automatic
- petrol
- blue
here html code
<td class="details"> <a href="./view/3505089/"><span class="p_t">audi a4</span></a> <a class="info" href="./view/3505089/">(details)</a><br> <div class="attribs"> roadster <br> p.o: 35562, <span class="p_l">buron</span>, phone. 231435424<br> 1800cc, 163bhp, automatic, petrol, blue, </div> </td> here doing regex
$bhps = array(); $gears = array(); preg_match_all('/(\d{2,3})bhp\b,/', $str2b, $bhps); preg_match_all('#(a(.*?)tomatic|ma(.*?)ual)#u', $str2b, $gears); foreach ....... $bhp = $bhps[1][$key]; $gear = $gears[1][$key]; ........
Comments
Post a Comment