Introduction to PHP Self-learning small display, PHP introductory self-study show _php tutorial

Source: Internet
Author: User

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.