In PHP you define a variable with the following form:
$variable_name = Value;
If you forget that dollar sign at the beginning, it will not work. This is a common mistake for new PHP programmers!
PHP supports a number of different variable
types: integers, floating point numbers, strings and arrays. In many languages,
it's essential to specify the variable type before using it: for example, a
variable may need to be specified as type
integer
or
type array
. Give PHP credit for a little intelligence,
though: it automatically determines variable type by the context in which it is
being used!
Important Note:Variable names in PHP are case sensitive, so
$php
is
different from $Php
or $PHP
No comments:
Post a Comment