Unlimited arguments for PHP function?

后端 未结 4 2026
野性不改
野性不改 2020-12-10 05:56

In php how would you create a function that could take an unlimited number of parameters: myFunc($p1, $p2, $p3, $p4, $p5...);

My next question is: how w

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-10 06:41

    Is there a reason why you couldn't use 1 function argument and pass all the info through as an array?

提交回复
热议问题