Home > Backend Development > PHP Tutorial > Self-study demonstration for getting started with PHP, self-study demonstration for getting started with PHP_PHP tutorial

Self-study demonstration for getting started with PHP, self-study demonstration for getting started with PHP_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-12 08:56:55
Original
903 people have browsed it

Small display of self-study for getting started with php, self-study display for getting started with php

 

  Small display of PHP functions

 

//Function definition

function name(){

echo "This is a parameterless function";

}

name();//no parameter function call

function name($age,$height){

 print "This is a parameterized function
";

echo "Height".$height.",Age:".$age."CM";

}

name(20,170);

/*

The following are some knowledge points recorded by newcomers’ self-study. If the masters don’t like it, please don’t comment.

There are two main types of 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 weakly typed language;

4: Loops, judgments, and branch selection statements in php are similar to statements in C# and 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 does not necessarily start from [0], but the "age", "height" and "weight" we define ourselves;

If you want to get the elements in the array, you can only use $man["age"], $man["height"], $man["height"];

*/

?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1110529.htmlTechArticleSmall display of PHP self-study, PHP self-study display!doctype html html head titlePHP function small display/title /head body ?php //Function definition function name(){ echo "This is a parameterless function...
Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template