I'm really trying to learn PHP...However I'm using "SAM's Teach Yourself PHP, MySQL, and Apache in 24 hours" and it seems to me that the syntax is either all wrong, or perhaps it's because I'm using Dreamweaver for an editor, or something...because anything I try to code by following the book gives me nothing but a blank page. Here is what the book says to type in...
<html>
<head>
<title>Listing 4.1 testing the type of a variable</title>
</head>
<body>
<?php
$testing; //declare without assigning
print gettype( $testing ); // null
print "<br>";
$testing = 5;
print gettype( $testing ); // integer
print "<br>";
$testing = "five";
print gettype( $testing) ; // string
print "<br>";
$testing = 5.0;
print gettype( $testing ); // double
print "<br>";
$testing = TRUE;
print gettype( $testing ); // boolean
print "<br>";
?>
</body>
</html>
And here is what I tried to do by searching through code examples...
<html>
<head>
<title>Listing 4.1 testing the type of a variable</title>
</head>
<body>
<?php
$testing; //declare without assigning
echo gettype($testing); // null
echo "<br>";
$testing = 5;
echo gettype($testing); // integer
echo "<br>";
$testing = "five";
echo gettype($testing); // string
echo "<br>";
$testing = 5.0;
echo gettype($testing); // double
echo "<br>";
$testing = TRUE;
echo gettype($testing); // boolean
echo "<br>";
?>
</body>
</html>
Could someone please look this over and tell me what might be the problem..I really need to learn this
Thank you all in advance
Troll