Php beginners and php beginners. Php beginners and php beginners! Does the doctypehtmlhtmlheadtitlePHP function show titleheadbody? Php function definition functionname () {echo
PHP function demo
// Function definition
Function name (){
Echo "this is a no-argument function ";
}
Name (); // no parameter function call
Function name ($ age, $ height ){
Print "this is a function with parameters
";
Echo "height". $ height. ", age:". $ age. "CM ";
}
Name (20,170 );
/*
The following are some of the knowledge points recorded by new students.
There are two main output statements in PHP;
1: print, output a single variable or string;
2: echo: outputs multiple variables or strings, and the execution efficiency is much faster than print.
3: php is a weak language;
4: The Loop, judgment, and branch selection statements in php are similar to those in C # and js;
5: The array naming method is somewhat unique:
$ Arr = array (key => value, key => value ,...);
Example: $ man = array ("age" => 20, "height" => 172, "weight" => 60 );
Indexes do not necessarily start from [0], but are defined as "age", "height", and "weight ";
To obtain elements in an array, you can only use $ man ["age"], $ man ["height"], and $ man ["height;
*/
?>
Success! Doctype html head titlePHP function small display/title/head body? Php // function definition function name () {echo "this is a non-argument function...