Name generated: Fancy Handsome-Porter
Name generated: Chilth Lad
Name generated: Beef Findlay
Name generated: Jeff Albuquerque
Click to get new names
Code:
<html>
<head>
<title>PHP TEST YAHHH</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<div class="topbar">
<?php
include 'navbar.php';
?>
</div>
<?php
// name generator
//
$first = array
(
"Jeff",
"Milk",
"Stethoscope",
"Chilth",
"Haywood",
"Rascal",
"Beer",
"Beef",
"Chip",
"Fancy",
);
$last = array
(
"Albuquerque",
"Hardwood",
"Barbecue",
"Stealthman",
"Yustop",
"Findlay",
"Squall",
"Handsome-Porter",
"Wargrove",
"Lad",
);
shuffle($first);
shuffle($last);
echo "Name generated: ";
echo $first[0];
echo " ";
echo $last[0];
echo '<br>';
echo "Name generated: ";
echo $first[1];
echo " ";
echo $last[1];
echo '<br>';
echo "Name generated: ";
echo $first[2];
echo " ";
echo $last[2];
echo '<br>';
echo "Name generated: ";
echo $first[3];
echo " ";
echo $last[3];
echo '<br>';
echo '<br>';
?>
<a href="javascript:history.go(0)">Click to get new names</a>
<div class="codebox">
<h3>Code:</h3>
<?php
highlight_file("ex045.php");
?>
</div>
</body>
</html>