Support

Account

Home Forums Front-end Issues Strip iframe tags but output the url Reply To: Strip iframe tags but output the url

  • Hi John,

    I get no output? Do i something wrong? I have not changed the iframe content in the textarea but i dont get the src value.

    <?php 
    	$value = get_sub_field('embed_iframe', false);
    if (preg_match('/src="([^"]+)/', $value, $matches)) {
      $url = $matches[1];
    } ?>