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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:53:30+00:00 2026-05-26T20:53:30+00:00

I have an embeddeble code of a slide like below. this whole html is

  • 0

I have an embeddeble code of a slide like below. this whole html is stored in a variable $embed_code.

I am printing this code in PHP. Now I want a piece of code from this HTML string.

The code is written below. I want the code between <object> tag only.

$embed_code = '
 <div style="width:425px" id="__ss_617490"><strong style="display:block;
 margin:12px 0 4px"><a href="http://www.slideshare.net/al.capone/funny-beer-babies-
 enginnering-rev-2-presentation" title="Funny beer babies enginnering rev. 
 2">Funny beer babies enginnering rev. 2</a></strong>


<object id="__sse617490" 
 width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com
/swf/ssplayer2.swf?doc=becoming-an-engineer-1222340701618958-9&stripped_title=funny-  
 beer-babies-enginnering-rev-2-presentation&userName=al.capone" /><param  
 name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/>
 <embed name="__sse617490" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=
  becoming-an-engineer-1222340701618958-9&stripped_title=funny-beer-babies-enginnering-
  rev-2-presentation& userName=al.capone" type="application/x-shockwave-flash" 
   allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed> 
  </object>




 <div style="padding:5px 0  12px">View more<a href="http://www.slideshare.net
  /"> presentations</a> from <a href="http://www.slideshare.net/al.capone">
  al.capone</a>.</div></div>';

Now I want this string only from <object id="....." to "</embed> </object> this whole HTML is generated dynamically so give me any idea for this.

How can I do this? Is there any PHP function that can extract html between of any tag?

  • 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-05-26T20:53:30+00:00Added an answer on May 26, 2026 at 8:53 pm

    Use the DOMDocument classes.

    $dom = new DomdDocument ();
    $dom -> loadHtml ($embed_code);
    $htmlObject = $dom -> getElementById ('__sse617490'); // Returns a DomElement
    

    http://www.php.net/dom

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

Sidebar

Related Questions

I have this schema of db: Table_A[1]-->[n]Table_C and Table_B[1]-->[n]Table_C Now, the PrimaryKey of Table_C
I have a problem with my hibernate mapping using EmbeddedId. My code looks like
I have problem when want read object with where (double variable) this is my
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have problems creating a custom query. This is what entities: @Entity public class
I have this DB design: CREATE TABLE report ( ID MEDIUMINT PRIMARY KEY NOT
I have this two table on the database revisions and Pagu in the Pagu
In legacy database tables we have numbered columns like C1, C2, C3, C100 or
I have 3 primary keys like in the following example: @Entity class User {

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.