What is a PHP?
- PHP means Personal Home Page.
- Then after it is known as a ”Hypertext PreProcessor”.
- It is developed by “Rasmas Lerdorf in 1994”.
- It is server side scripting language which is used to create dynamic website.
- PHP script also executed on this server.
- It support many database like mysql, oracle, odbc, etc.
- It is open source software.
- It support multiple plateform.
- PHP syntax is easy to understand.
Syntax
Variable Declaration in PHP
- In the PHP variable declaration is easy.
- PHP is a loosely type language.
- In PHP for declare a Variable ($) Dollar Sign is compulsory.
- In the PHP for declare a variable datatype declare not be compulsory.
- You can place a variable any where in the script using ($) Dollar Sign.
Syntax
=> Variable Function fo PHP
We can use a Varible function for perform operation on
Variable.
- Gettype:- Use to get the datatype of Variable.
Syntax
gettype(variable_name);
- Settype:- Use to set the datatype of variable.
Syntax
settype(Varible_name,Varible_type);
- Isset:- Used to check the variable is set or not.
- It return true or false.
- If variable is set then return true otherwise false.
Syntax
isset(variable1, variable2,…….);
- Unset:- Used to destroy given Varible.
Syntax
unset(Variable1, Variable2,…………);
- Strval:- Convert a value of variable into a String.
Syntax
strval(Variable_name);
- Floatval:- Convert a value of variable into a Float.
Syntax
floatval(Variable_name);
- Intval:- Used to get the value of a variable.
Syntax
intval(Variable_name);
No comments:
Post a Comment