Blogger Information
Blog 7
fans 0
comment 1
visits 5773
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
函数的定义
bokewinner
Original
976 people have browsed it

函数的定义为:
function 函数名(参数1,参数2,...){内容;}
1.函数名的有关知识:名字以字母或下划线开头,不能和系统函数同名
2.参数的传值方式:值传递,地址传递(地址传递的参数数据需为变量)

<?php
function f1($a,$b,$c)
{
    $result = $a+$b+$c;
    return $result;//返回结果
}
$jieguo=f1(1,2,3);//调用函数(传入参数为1,2,3)
echo $jieguo;
?>


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
1 comments
正在学习的菜鸟 2017-08-22 23:05:18
哈哈
1 floor
Author's latest blog post