The iframe is assigned to a variable $string. I want extract the texts between embed/ and ?rel in the iframes src. So i would be looking for this code sL-2oYAI35o
<iframe width="420" height="315" src="http://www.youtube.com/embed/sL-2oYAI35o?rel=0" frameborder="0" allowfullscreen></iframe>
Would I need to use a php substr function or regex? I cant use the regular substring because the start value may differ.