extract price by preg_match_all
| From: | Tontonq Tontonq | Date: | Mon, 14 Feb 2011 14:05:30 +0000 |
| Subject: | extract price by preg_match_all | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-311276@lists.php.net to get a copy of this message | ||
example data:
<div class="picboxfooter">
<span class="newprice"><span class="productOldPrice">old price
829,00
€</span><br />your price 58,90 € *</span>
</div>
another :
<span class="newprice"> 9,90 € *</span>
i want to extract 829,.00 & 58,90 from first source , 9,90 from the second
i tried many way like preg_match_all('/<span
class="newprice">(\$[0-9,]+(\.[0-9]{2})?)<\/span>/',$data,$prices);
it doesn't work