I have this content in a variable named for example $iframe
$iframe='<iframe title="Example Iframe" width="640" height="360" src="https://example.com/mypage?parameter=1" frameborder="0" allowfullscreen></iframe>';
And I need to strip everything except the src URL without parameters
In the example above something like this should be the final result:
echo $iframe;
https://example.com/mypage
I'm not sure if there is a function to search for properties within a HTML string and then maybe use some regex to strip out the parameters...