Jump to content

is this code error?


shams

Recommended Posts

hi,
this is the a php code but the integer part doesn't show any ouput:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
$bool = TRUE; // a boolean
$str = "foo"; // a string
$int = 12; // an integer

echo gettype($bool); // prints out "boolean"
echo gettype($str); // prints out "string"

// If this is an integer, increment it by four
if (is_int($int)) {
$int += 4;
}
?>
</body>
</html>
this is the browser ouput:
booleanstring
any help please?
Link to comment
https://forums.phpfreaks.com/topic/5905-is-this-code-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.