Mon Oct 27, 2008 6:14 pm
<html>
<head>
<title>Changing the type of a variable with settype()</title>
</head>
<body>
<?php
$undecided = 3.14;
print gettype( $undecided );
print " -- $undecided<br>";
settype( $undecided, string );
print gettype( $undecided );
print " -- $undecided<br>";
settype( $undecided, integer );
print gettype( $undecided );
print " -- $undecided<br>";
settype( $undecided, double );
print gettype( $undecided );
print " -- $undecided<br>";
settype( $undecided, boolean );
print gettype( $undecided );
print " -- $undecided<br>";
?>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.