Skip to content

Kirby 4.1.2

youtube()

Embeds a Youtube video by URL in an iframe

youtube(string $url, array $options = [ ], array $attr = [ ]): string|null

Parameters

Name Type Default
$url * string
$options array [ ]
$attr array [ ]

Return type

string|null

Example

<?= youtube('https://www.youtube.com/watch?v=mbyzgeee2mg') ?>