How to pass an indefinite number of parameters into a php function?
I think there are two methods
Transfer values in array
Get the value through func_get_args in the function
The simplest way is to pass in an array , the number of array values can be unlimited. Another method is to use func_get_args to get the parameters. ) {
[0]=>
int(3)
[1]=>
}
array(3) {
["sql"]=>
int(1)
["query"]=>
int(3)
["db"]=>
string(3) "lee"
}
array(0) {
}