0
我想使用存储在数据库中的代码显示一个youtube嵌入式视频。但它显示一个错误。我在做什么错误..?使用php的YouTube iframe视频
<?php
require 'db.php';
$result = $mysqli->query("SELECT * FROM ycodes") or die($mysqli->error());
$row = mysqli_fetch_array($result);
echo $row['ycode'];
?>
<!DOCTYPE html>
<html>
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?$row['ycode']?>" frameborder="0" allowfullscreen></iframe>
</body>
</html