fork(1) download
  1. <?php
  2. $html = '<span style="font-size:14px;"><iframe allowfullscreen="" frameborder="0" height="360" mozallowfullscreen="" src="https://p...content-available-to-author-only...o.com/video/34234234" webkitallowfullscreen="" width="640"></iframe></span></p>
  3. <p>
  4. <span style="font-size:14px;"><a href="https://v...content-available-to-author-only...o.com/34234234"> Texto.</a> from <a href="https://v...content-available-to-author-only...o.com/user7990284">Texto</a> on <a href="https://v...content-available-to-author-only...o.com">Vimeo</a>.</span></p>
  5. <p>';
  6.  
  7. $separacionIframes = preg_split('/(<iframe[^>]+>)/i', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
  8.  
  9. print_r($separacionIframes);
  10. ?>
Success #stdin #stdout 0.02s 82624KB
stdin
Standard input is empty
stdout
Array
(
    [0] => <span style="font-size:14px;">
    [1] => <iframe allowfullscreen="" frameborder="0" height="360" mozallowfullscreen="" src="https://p...content-available-to-author-only...o.com/video/34234234" webkitallowfullscreen="" width="640">
    [2] => </iframe></span></p>
        <p>
            <span style="font-size:14px;"><a href="https://v...content-available-to-author-only...o.com/34234234"> Texto.</a> from <a href="https://v...content-available-to-author-only...o.com/user7990284">Texto</a> on <a href="https://v...content-available-to-author-only...o.com">Vimeo</a>.</span></p>
        <p>
)