Labunski wrote:
"PHP does not support function overloading."
So, is there any other way of getting a number of parameters(variables)
passed to a function?
aka.
function fruits($apple, $banana, $kiwi, $grape){
#should (somehow) output 4
}
OK. if it was an array, than I could use count($array), but now I'm stuck!
Thanks in advance!
func_num_args() will do the trick.
and then you use func_get_arg() or func_get_args() to use them.
http://au2.php.net/func_num_args
--josh
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php