+ 3
Why data type are not using in php?
9 ответов
+ 5
you can set the type of variable by using the settype command for eg
<?PHP
$name = "Lavina Vaishnav123";
settype ($name,"integer");
?>
The output will be the 123 as the command picks out the integer from the string.
+ 3
variables are declared in PHP by using $
like
$name = "Lavina Vaishnav"
+ 3
actually my question is👆
+ 3
PHP is known as a loosely typed language it can declare wether a variable is a string, int or array on its own
+ 3
but already php have many data type like int ,float and also boolean .
+ 3
thank you for best explanation 😊👆
+ 1
welcome
+ 1
@Immortal
you r right