What exactly you want to achieve??
strpos(originalText,findThis)
returns the number or false
. Number - integer which basically is the the starting position of string/char you are looking in it. For example your original text is "Ronalds" and you are searching for "R", it will return integer 0, because the char R is in the 0th position (think about the string as an array - it is 0th elementh). And so on. If you are looking for char "E" - and there is definetely not such a char in your original text, then the function will return boolean false
.
in your condition it could look like this - if in original text somewhere there is https://www.youtube.com then inner part will be processed. (Where does this $youtube_id2 comes from in your code?)
Isnt it switch-case
style you`re looking for your conception here?