Possible Duplicate:
PHP get all arguments as array?
Well,
In java I can do this (pseudocode):
public hello( String..args ){
value1 = args[0]
value2 = args[1]
...
valueN = arg[n];
}
and then:
hello('first', 'second', 'no', 'matter', 'the', 'size');
Is something like this in php?
EDIT
I now that I can pass an array like hello(array(bla, bla))
, but may could exists the way mencioned above, right?
See
func_get_args
:EDIT 1
When you call
foo(17, 20, 31)
func_get_args()
don't know that the first argument represents the$first
variable for example. When you know what each numeric index represents you can do this (or similar):If I want a specific variable, I can ommit the others one: