Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8176625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:16:06+00:00 2026-06-06T23:16:06+00:00

I need to access the 48.20 Lac(s) text which is without any tag inside

  • 0

I need to access the 48.20 Lac(s) text which is without any tag inside the div,which is the reason I’m not able to access it.
I need to find this in a PHP file.I’ve tried $html->find(‘div.priceDetail’) followed with trim(strip_tags($result)) which gave me 48.20 Lac(s) + unnecesary text.
Since I’ve to build a generic file I can’t depend on exploding and imploding for a particular fixed case.

<div class="priceDetail">
    <b>Total Price :</b>
    <img alt="" src="someimage">48.20 Lac(s)
    <!-- Per Sq Ft Price -->
    <span class="pricePerSqFt">(Price per sq.ft. : Rs. 3,679)</span>
    <!-- Code for price Trends -->
    <span class="priceGrowth">4 %
        <img alt="" src="someimage"
        align="absmiddle">
        <span class="iconWhatisThis">
            <img src="someimage"
            class="whatIcon" align="absmiddle">
            <span style="" id="StoolTip" class="price_main-c"></span>
        </span>
    </span>
    <div class="tt_top-c">
        <span class="priceGrowth"></span>
    </div>
    <div class="tt_mid-c">
        <div class="tt_pointer-c"></div>
        <div>
            <span class="tt_txt-c">Per sq.ft. price for this property is
                <b>higher than the average</b>property price in this locality as per MagicBricks.com
                Price Trends.</span>
        </div>
        <span class="tt_txt-c">
            <span class="tp_txt">To know more about this
                <a href="#priceTrends" onclick="swithTab('priceTrends', tabbedDivArray);">Click
Here</a>
            </span>
        </span>
    </div>
    <div class="tt_bot-c"></div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:16:10+00:00Added an answer on June 6, 2026 at 11:16 pm

    Here a solution with DomDocument, probably more robust than Regex :

    $DOM = new DOMDocument;
    $DOM->loadHTML($str);
    
    //Get all the image tags
    $elem = $DOM->getElementsByTagName('img');
    //Get the first Image
    $first = $elem->item(0);
    //Get the node after the image
    $txt=  $first->nextSibling;
    //Get the text
    echo $txt->nodeValue;
    

    Of course it requires that the text is always located after the first image in the div.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to access a RESTful server, which is not created with WCF. For
I need to access a components tag attribute like: <h:inputtext id=input_age/> from a backing
I need to access the commandline from within a C# application. I can't find
I need to access camera from a remote html page. I load this html
I need to configure my firewall settings for C2DM. Which means I need access
Why do I need to obtain an access token? Also, should I store this?
I'm developing application which need access to user's facebook account. It is working, but
We have a test engineer that does not need access to all of our
I need access to the uint64_t typedef from stdint.h in some wrapper code that
I have two different modules that need access to a single file (One will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.