variables data type in php code example
Example 1: 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)
?>
Example 2: PHP Data Types
<?php
$x = "Hello world!";
$y = 'Hello world!';
echo $x;
echo "<br>";
echo $y;
?>