php -- 获取函数参数

时间:2014-05-25 02:24:48   收藏:0   阅读:247

----- 015-parameter.php -----

bubuko.com,布布扣
 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta http-equiv="content-type" content="text/html; charset=utf-8">
 5     <title>获取函数参数</title>
 6 </head>
 7 <body>
 8 <h3>获取函数参数</h3>
 9 <pre>
10 <?php
11     function hello()
12     {
13         $prams = func_get_args();
14         foreach ($prams as $value) {
15             echo "Hello,", $value, "!\n";
16         }
17     }
18     hello("塞班", "黑莓", "联发科");
19 ?>
20 </pre>
21 </body>
22 </html>
bubuko.com,布布扣

bubuko.com,布布扣

php -- 获取函数参数,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!