1 Variables in PHP

Program:
<?php     

$a = 0;

echo "Variable: $a Type: ".gettype($a)."<br/>"; 

settype($a,"string");

echo "Variable: $a Type: ".gettype($a)."<br/>"; 

settype($a,"boolean");

echo "Variable: $a Type: ".gettype($a)."<br/>"; 

$b = 5.45;
echo "In String:".gettype((string)$b)." Value:".(string)$b;

echo "<br/> Type of B:".gettype($b)."In Integer:".(int)$b;

?>


Output:
Variables in PHP


Previous
Next Post »