Variables in PHP
$txt = "Hello world!";
$x = 5;
$y = 10.5;
?>
PHP Variables Scope
In PHP, variables can be declared anywhere in the script.The scope of a variable is the part of the script where the variable can be referenced/used.
PHP has three different variable scopes:
local
global
static
No comments:
Post a Comment