Skip to content

Instantly share code, notes, and snippets.

@webag
Last active May 30, 2019 07:02
Show Gist options
  • Save webag/e655df64d66508ee2a22b2d31cb704ee to your computer and use it in GitHub Desktop.
Save webag/e655df64d66508ee2a22b2d31cb704ee to your computer and use it in GitHub Desktop.
get Youtube video id from url
<?
//Видео url вида: https://www.youtube.com/watch?v=RYF4Gsrxur4
parse_str(parse_url($arResult['PROPERTIES']['VIDEO']['VALUE'], PHP_URL_QUERY), $video_id_arr);
?>
<pre><?print_r($video_id_arr['v'])?></pre>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment