我正在尝试制作这个网站来练习我的编程。
<html>
<title>VidVoter</title>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<div id="welcome">Welcome to VidVoter!</div>
<a href="file://localhost/Users/alihashemi/Desktop/vidvoter.html">
<div id="vote1">Vote for this video</div>
</a>
<a href="file://localhost/Users/alihashemi/Desktop/vidvoter.html">
<div id="vote2">Vote for this video</div>
</a>
</head>
<?php
$videos = array("xrCTiImIWk4" , "WCpfVPY4J6I" , "__2ABJjxzNo" , "y7tI1E6kp0o" , "-NSL_DgwCYw");
$rand = array_rand($videos);
$rand_key = isset($_GET['id']) ? $_GET['id'] : $rand;
?>
<p>
<h1><iframe width="560" height="315" src="http://www.youtube.com/embed/<?php .$rand_key.?>" frameborder="0" allowfullscreen></iframe></h1>
<h2><iframe id="vid2" width="560" height="315" src="http://www.youtube.com/embed/<?php .$rand_key.?>" frameborder="0" allowfullscreen></iframe><h2>
</p>
</html>
我似乎无法弄清楚如何从一系列视频中随机选择一个视频并将其放置在网站上。你能帮帮我吗?