if you are a programmer ,php have a new idea to you.You don't have to determine the type of variable.What you do is just giving the value to variable.
like that $variable_name= value;
just like that , not integer or string before variable name .
variable example - Code:
<?php
$massage= "my luck number is ";
$mynumber = 4;
echo "$massage $mynumber";
?>
the output is :
- Code:
my luck number is 4
There some conventions with variables names :
- PHP variables must start with a letter or underscore "_".
- PHP variables may only be comprised of alpha-numeric characters and underscores. a-z, A-Z, 0-9, or _ .
- Variables with more than one word should be separated with underscores. $my_variable
- Variables with more than one word can also be distinguished with capitalization. $myVariable