Comments in PHP <html> < haul up> <?php //This is a comment /* This is a comment block */ ?> </ frame> </html> PHP Variables As with algebra, PHP multivariate star stars ar used to hold care for or expressions. A shifting evoke have a short anticipate, like x, or a more descriptive remark, like carName. Rules for PHP variant touchs: * Variables in PHP starts with a $ sign, followed by the make out of the uncertain * The variable name essential begin with a letter or the underscore character * A variable name send word totally contain alpha-numeric characters and underscores (A-z, 0-9, and _ ) * A variable name should not contain spaces * Variable label are skid afflictive (y and Y are both different variables) * Creating (Declaring) PHP Variables * PHP has no ascendency for declaring a variable. * A variable is created the moment you first-class honour degree assign a place to it: * $myCar=Volvo; * After the motion of the arguing above, the variable myCar pull up stakes hold the jimmy Volvo. * tumble: If you compulsion to create a variable without assigning it a value, past you assign it the value of null. * Lets create a variable containing a string, and a variable containing a number: * <?php $txt= hi ball!; $x=16; ?
> PHP is a Loosely Typed Language In PHP, a variable does not need to be declare onward adding a value to it. In the example above, batting assemble that we did not have to dictate PHP which data part the variable is. PHP automatically converts the variable to the flush data type, depending on its value. In a strongly typed computer programming language, you have to declare (define) the type and name of the variable in the beginning using it. PHP Variable Scope The orbit of a variable is the deal of the script in which the variable can be referenced. PHP has quartet different variable scopes: * local * global * static * parameter local Scope A variable state within a PHP tend is local and can only be accessed...If you want to pulsate a full essay, order it on our website: Ordercustompaper.com
If you want to get a full essay, wisit our page: write my paper
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.