|
He practises with the variables |
|
|
|
We want to store in 3 variables the chain "Hello World", the number 55 and the value booleano "true". Also we want to define a constant that is the number PI, 3.141593. How would you do it?
To see Solution.
<? php
$saludo = "Hello World";//The chains between quotation marks, already be always double (") or simple (').
$numero = 55;//The numbers are indicated without quotation marks.
$bool = true;//The values booleanos also are indicated without quotation marks and they usually indicate in small letters.
"PI" DEFINES (3.141593);/*, On having defined the constant, we indicate his name between quotation marks but when we should use it we will not indicate it between quotation marks (for example I throw PI;) */
?>
|