Write a PHP script to get type of variable using gettype() Write a PHP script to set type of variable using settype() || DWPD Sem 5 Practical 10

DWPD : Practical 10



1.Write a PHP script to get type of variable using gettype()<?php
 $a=10;
 echo "variable a is ".gettype($a)."<br>";
 
 settype($a,"string");
 
 echo "now variable a is ".gettype($a);
?>


Output :

 

Comments