Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Since you're working with HTML here, I would recommend using DOM functions:</p> <pre><code>$doc = new DOMDocument; $doc-&gt;loadHTML($string); foreach ($doc-&gt;getElementsByTagName('iframe') as $iframe) { $url = $iframe-&gt;getAttribute('src'); // parse the query string parse_str(parse_url($url, PHP_URL_QUERY), $args); // save the modified attribute $iframe-&gt;setAttribute('src', $args['url']); } echo $doc-&gt;saveHTML(); </code></pre> <p>This outputs the full document, so you would need to trim it down:</p> <pre><code>$body = $doc-&gt;getElementsByTagName('body')-&gt;item(0); foreach ($body-&gt;childNodes as $node) { echo $doc-&gt;saveHTML($node); } </code></pre> <p>Output:</p> <pre><code>&lt;p&gt;Think Kavinsky meets Futurecop! meets your favorite 80s TV show theme song and you might be pretty close to Swedish producer Johan Bengtsson's retro project, &lt;a href="https://soundcloud.com/daataa"&gt;&lt;strong&gt;Mitch Murder&lt;/strong&gt;&lt;/a&gt;. Title track, "The Touch," is genuinely lighthearted and fun, crossing over from 80s synth work into a bit of French Touch influence; also including a big time guitar solo straight out of your dad's record collection. B-side "Race Day" could very easily be the soundtrack to a video montage of all of your favorite beach scenes from every 80s movie you've ever watched, or as the PR put it, "quite possibly a contender to be the title screen music to a Wave Race 64 sequel." Sounds awesome to me. Also included in this package out today on &lt;a href="https://soundcloud.com/maddecent/"&gt;Mad Decent&lt;/a&gt;'s Jeffree's sub-label are two remixes of the A-side from Lifelike and Nite Sprite. Download below. &lt;iframe src="http://api.soundcloud.com/playlists/8087281" frameborder="no" scrolling="no" width="100%" height="350"&gt;&lt;/iframe&gt;&lt;/p&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload