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 9168761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:42:11+00:00 2026-06-17T15:42:11+00:00

I need to exclude a img tag from <a href=http://www.facebook.com/xxxxxx> <img style=float: left; margin-right:

  • 0

I need to exclude a

img

tag from

 <a href="http://www.facebook.com/xxxxxx">
     <img style="float: left; margin-right: 10px;" 
          src="http://profile.ak.fbcdn.net/xxxxx/xxxxx.jpg">
      Matt Cartledge
 </a>

and get only the text i.e. Matt Carledge. Is it possitble using php simple html dom parser?
Thnk you.

$first_anchor = $list->find('a',0);
$prof_img = $first_anchor->find('img',0)->src;
echo $prof_name = $first_anchor->innertext;die();

i need prof_name to be “Matt Cartledge”.

  • 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-17T15:42:12+00:00Added an answer on June 17, 2026 at 3:42 pm

    Ah got it, its ->plaintext; thnk you

    If we use like $something->innertext;(It gives everthing inside $something including all tags within it) AND if we use $something->plaintext;(It give only the texts exluding the tags).

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

Sidebar

Related Questions

I need to redirect any www.mysite.com/anything/anything OR www.mysite.com/anything AND EXCLUDE www.mysite.com/app TO www.mysite.com/app Of
I have a listener for click events from which I need to exclude some
I need to know how to exclude files/folders from php generated zip. Here is
I need to exclude a product line from a database so I do pline
I need to exclude some code from the compilation when targeting the .NET 3.5
I need to exclude dbconfig.php from git repository. How can I remove it from
I have a List of type Fee from which I need to exclude the
We need to exclude few jars from war ...we are using maven 3 in
I need to exclude some URLs for a jMeter test: dont exclude: http://foo/bar/is/valid/with/this http://foo/bar/is/also/valid/with/that
I am creating an online booking system & need to exclude closed days from

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.