teting types of variables(outputnnot showing)
Posted: Wed Jun 16, 2010 4:38 pm
Hi just learning php from samms teach yourself, typed in code from book and when tested output not showing. Apache is running and php is working as have done test, using php page in dreamweaver. Can anyone help this is code below. Thanks
Code: Select all
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
$testing; // declare without assigning
echo "is null? ".is_null($testing); // checks if null
echo "<br/>';
$testing = 5;
echo "is a integer? ".is _int($testing); // checks if integer
echo "<br/>";
$testing = "five";
echo "is a string? ".is_string($testing); // checks if string
echo "<br/>";
$testing = 5.024;
echo "is a double? ".is_double($testing); // checks if double
echo "<br/>";
$testing = true;
echo "is boolean? ".is_bool($testing); // checks if boolean
echo "<br/>";
$testing = array('apple', 'orange', 'pear,');
echo "is an array? ".is_array$($testing); // checks if array
echo "<br/>";
echo "is numeric? ".is_numeric($testing); // checks if numeric
echo "<br/>";
echo "is a resource? ".is_resoure($testing); // checks if is a resource
echo "<br/>";
echo "is an array? ".is_array($testing); // checks if is an array
echo "<br/>";
?>
</body>
</html>