vishnu kalakota
asked on
How can i Get Data from using preg_match_all?
<div class="price offerprice bold"> $986.00 </div>
i have 12 different price divs in my html page
i want to grab all the prices from all matching divs
i have 12 different price divs in my html page
i want to grab all the prices from all matching divs
Can you please show us a more representative example? If we can see all 12 divs, we can give you tested and working examples that cover all the cases!
ASKER
<span class="price">
<div class="price offerprice bold"> $986.00 </div>
</span>
<div class="price offerprice bold"> $986.00 </div>
</span>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Julian
I have sample html here i tried ur code just giving empty array?
</a>
I have sample html here i tried ur code just giving empty array?
<div id="product-list">
<ul>
<li class="product">
<a class="no_underline" href="/shop/m20ProductDisplayView?catalogId=10551&langId=-1&productId=298516&storeId=10151">
<div class="image-wrapper">
<span class="details">
<span class="name">iPhone 6 16GB Gold</span>
<span class="price">
<div class="price offerprice bold"> $986.00 </div>
</span>
</span>
</a>
<div id="productdetail_298516" data-id="298516" data-inventory="search">
</li>
<li class="product">
<a class="no_underline" href="/shop/m20ProductDisplayView?catalogId=10551&langId=-1&productId=298518&storeId=10151">
<div id="productdetail_298518" data-id="298518" data-inventory="search">
<div class="availability availability-wide">
</div>
</li>
<li class="product">
<a class="no_underline" href="/shop/m20ProductDisplayView?catalogId=10551&langId=-1&productId=298522&storeId=10151">
<div id="productdetail_298522" data-id="298522" data-inventory="search">
<div class="availability availability-wide">
<div class="row-fluid inline-availability" data-placement="bottom" data-html="true" data-scroll="" data-content="<div class='search-page-popover'> <div class='availability'> <h2>Delivery</h2> <div class='row-fluid deliver-to-door instock'> <div class='icon'></div> <div class='desc'> <div class='title store-title'>Deliver to Door</div> <div class='message'>Dispatched <span class="highlight-green">NEXT</span> business day</div> </div> </div> </div> <div class='divider'></div> <div class='availability'> <h2>My Store: <span class='regular'>Cannington </span></h2> <div class='row-fluid click-and-collect instock'> <div class='icon'></div> <div class='desc'> <div class='title store-title'>Click & Collect</div> <div class='message'> Collect in 2 business days </div> </div> </div> <div class='row-fluid in-store outofstock'> <div class='icon'></div> <div class='desc'> <div class='title store-title'>Shop in Store</div> <div class='message'>Out of stock in store</div> </div> </div> </div> </div> " data-toggle="popover" data-original-title="" title="">
</div>
</div>
</li>
<li class="product">
<li class="product">
<li class="product">
<li class="product">
<li class="product">
<li class="product">
<li class="product">
<li class="product">
<li class="product">
<a class="no_underline" href="/shop/m20ProductDisplayView?catalogId=10551&langId=-1&productId=299532&storeId=10151">
<div class="image-wrapper">
<span class="details">
<span class="name">iPhone 6 Plus 64GB Gold</span>
<span class="price">
<div class="price offerprice bold"> $1,285.00 </div>
</span>
</span></a>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
'@<div class="price offerprice bold">(.*?)</div>@si',
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for vishnu kalakota's comment #a40836765
for the following reason:
Its working fine for me
Accepted answer: 0 points for vishnu kalakota's comment #a40836765
for the following reason:
Its working fine for me
Its working fine for meIs it working based on responses here - or because of a solution you found yourself, if the latter can you provide details.