CSSを使用する必要があります
html, body, iframe {
height: 100%;
width: 100%;
}
編集: 次回は、質問を適切に定義し、投稿する前に適切な説明を追加する必要があります。
とにかく、データベースにサイズがあるので、エコーを使用してサイズを変更するだけです。最初にデータベースから幅と高さを取得し、それを HTML にエコーする必要があります。
<?php
$iframe = html_entity_decode($post['url']);
$newWidth = 610;
$newHeight = 450;
?>
<iframe
src="<?php echo $iframe; ?>"
height="<?php echo $newHeight; ?>"
width="<?php echo $newWidth; ?>"
frameborder="0" allowfullscreen>
</iframe>
v12351524274573523 を編集
$iframe = '<iframe width="400" height="225" src="youtube.com/embed/c7ct6pNOvEE?feature=oembed" frameborder="0" allowfullscreen></iframe>';
$src = html_entity_decode($post['url']);
$height = 450;
$width = 610;
// add autoplay
$src = $src . (strstr($src, '?') ? '&': '?') . 'autoplay=1';
$iframe = preg_replace('/src="(.*?)"/i', 'src="' . $src .'"', $iframe);
$iframe = preg_replace('/height="(.*?)"/i', 'height="' . $height .'"', $iframe);
$iframe = preg_replace('/width="(.*?)"/i', 'width="' . $width .'"', $iframe);