参数_PHP

WBOY
Release: 2016-06-01 12:39:46
Original
1037 people have browsed it

通过参数表可以传递信息到函数,这个表可以是变量或常量以逗号(,)分隔构成的。

PHP3支持使用值来传递变量(默认),通过调用传递,和默认的参数值.可变长度的参数列表目前不被支持,但是可以通过传递数组来实现.

function takes_array($input) {

echo "$input[0] + $input[1] = ", $input[0]+$input[1];

}

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template