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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

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

Zend Studio 13.0.1
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version
Visual web development tools
