PHP Introductory Self-study mini-show, PHP introductory self-study show
PHP function Small Display
function definition
Function name () {
echo "This is a non-parametric function";
}
Name ();//no parameter function call
Function name ($age, $height) {
Print "This is an argument function
”;
echo "height". $height. ", Age:". $age. " CM ";
}
Name (20,170);
/*
The following is the new self-study of some of the knowledge points recorded, the great God do not like to spray oh.
There are two main kinds of output statements in PHP;
1:print, output a single variable or string;
2:echo, the output of multiple variables or strings, and execution efficiency is much faster than print.
3:php is a weakly typed language;
In the 4:php, the loops, the judgment, the Select branch statements are similar to the statements in the C#,JS;
5: The array naming method is a bit unique:
$arr =array (Key=>value,key=>value,...);
Example: $man =array ("Age" =>20, "height" =>172, "weight" =>60);
The index is not necessarily starting from [0], but our own definition of "age", "height", "weight";
To get the elements in the array, you can only pass the way of $man["age", $man ["height"], $man ["height"];
*/
?>
http://www.bkjia.com/PHPjc/1110529.html www.bkjia.com true http://www.bkjia.com/PHPjc/1110529.html techarticle PHP Getting Started self-taught mini-show, PHP introductory self-study show!doctype HTML HTML head titlephp function small display/title/head body? PHP//function definition functions name () {echo "This is a non-parametric Number of ...