我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

php函数变量参数[重复]

Possible Duplicate:
How to pass variable number of arguments to a PHP function

I make my framework in php I want to have variable function arguments ex

if I have 2 parameter

    $a,$b;

the function become

    function name($a,$b);

and if I have 3 parameter

    $a,$b,$c;

the function become

    function name($a,$b,$c);

Check out http://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list. Is that what you're looking for? If not, can you just accept an array?

近期文章

  • 将数组推入另一个数组
  • Twitter作为Silex的Auth系统
  • 创建安全的API通信
  • 在PHP / SQLite中获取图像路径
  • 禁止POST的代理
  • php mysql_select_db无法正常工作[关闭]
  • 带有$ _GET的ID的未定义索引
  • 意外的T_string错误 - 在哪里? [关闭]
  • PHP卷曲命中特殊字符
  • 如何使用PHP解析此XML?
  • 如何设计这个领域模型?
  • 为什么我要使用PHP框架[关闭]
  • 用php获取外键(语法)
  • 在标签之间添加换行符
  • 分页不正常
  • 仅替换多个新行
  • MYSQLI_NUM是什么意思和做什么?
  • Sqlite内部连接不起作用:s
  • (INT)假; 在PHP为什么会这样?
  • Jquery和codeigniter会话

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华