Answers for "php define variable type"

PHP
0

php define variable type

<?php
$foo = "5bar"; // string
$bar = true;   // boolean

settype($foo, "integer"); // $foo is 5   (integer)
settype($bar, "string");  // $bar is "1" (string)
?>
Posted by: Guest on April-07-2021

Browse Popular Code Answers by Language