php入门自学小展示,php入门自学展示
//函数定义
function name(){
echo "这是一个无参函数";
}
name();//无参函数调用
function name($age,$height){
print “这是一个有参函数
”;
echo "身高".$height.",年龄:".$age."CM";
}
name(20,170);
/*
以下是新人自学所记录的一些知识点,大神们不喜勿喷哦。
PHP中输出语句主要有两种;
1:print,输出单一的变量或者字符串;
2:echo,输出多个变量或者字符串,且执行效率比print快很多。
3:php是弱类型语言;
4:php中的循环、判断、选择分支语句与C#,js中的语句相似;
5:数组命名方式有点儿独特:
$arr=array(key=>value,key=>value,...);
例:$man=array("age"=>20,"height"=>172,"weight"=>60);
索引不一定就是从[0]开始了,而是我们自己定义的“age”、“height”、“weight”;
要想获取数组中的元素,那就只能通过$man["age"]、$man["height"]、$man["height"]的方式喽;
*/
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor