Jump to content

Get price sum


mstdmstdd

Recommended Posts

  Hello,

I tried to get 1st price :



$html= 'New (1) from $799.99 + $14.99 shipping';
$pattern = '~
(?:.*)
[\s]*from[\s]*
(?<price>[\d\.\$]*)
(?:.*)
~isUx';
$ret = preg_match(($pattern), $html, $imagesArrayText);
echo '<pre>$imagesArrayText::'.print_r($imagesArrayText,true).'</pre>';
echo '<pre>$ret::'.print_r($ret,true).'</pre>';


But price is empty. why?

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.