example i have xml code like this:
$xml=<<<XML
<?xml version="1.0"?>
<cars>
<desc1>
<h1>Title 1</h1>
<p>Content</p>
</desc1>
<desc2>
<h1>Title 1</h1>
<p>Content</p>
</desc2>
</cars>
XML;
how i can grab string between tag <desc1>...</desc1>
using simplexml so the output like this:
$output='<h1>Title 1</h1>
<p>Content</p>';
thanks in advance :)
No comments:
Post a Comment