This work:
<?php
$urlyt = ‘QK-Z1K67uaA’;
$url = ‘https://www.googleapis.com/youtube/v3/videos?part=snippet&id=’. $urlyt .’&keysecret’;
?>
output: https://www.googleapis.com/youtube/v3/videos?part=snippet&id=QK-Z1K67uaA&keysecret
this doesn’t work:
<?php
$urlyt = the_field(‘ytvideo’);
$url = ‘https://www.googleapis.com/youtube/v3/videos?part=snippet&id=’. $urlyt .’&keysecret’;
?>
output: QK-Z1K67uaA
Why is there such a mistake
I used ‘get_field’ problem solved .