<html>
<head>
<title>PHP test page</title>
</head>
<body bgcolor=#ffffff>

<?php

// Variables begin with a $ (except for arrays, but we don't
// care about those right now). So we'll assign some values
// to some variables and then do stuff with them.

$firstname = "Joe";
$lastname = "Schmoe";

// Here, notice we can use PHP to spit out HTML, which
// is sort of the converse of what we've been doing, which
// is embedding PHP inside HTML. This is what makes PHP so
// flexible; you can do both interchangeably.  

echo "<p>Name is (last, first): ";
echo $lastname;
echo ", ";
echo $firstname;

// Another one of php's built-in functions.
// We make a new variable to hold the value
// of whatever our function produces. 

$weirdname = strrev($lastname);

echo "<p>Last name, reversed: ";

echo $weirdname;

echo "<p>Done.";

?>

</body>
</html>

