1. 程式人生 > >print_r輸出陣列,並製作車牌搖號

print_r輸出陣列,並製作車牌搖號

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
</head>

<body>

<?php 
$numbers = array ('0000','1111','2222','3333','4444');
$rand  =rand(0,4);
echo "車牌號碼:";
print_r($numbers);

echo "<br>隨機抽取的牌照:";
echo $numbers[$rand];
?>

</body>
</html>