I have the following code:
$embed_url = str_replace('<iframe width="512" height="288" frameborder="0" scrolling="no" src="', '', $embed_url);
$embed_url = str_replace('"></iframe>', '', $embed_url);
What happens is the iframe width and height is not fixed values, so they can be any other numbers.
How can I make this works for any width/height?
Thanks.
Edit: What i am trying to get is the src value.
You could use a regular expression:
If all you want is to retrieve the value of
src, you could usepreg_match()instead: