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?