mostafatalebi Posted January 7, 2013 Share Posted January 7, 2013 Hello How I can write functions in PHP which could have any number of arguments, and not a limited number, or a fixed/predefined number. for instance: function doCheck ($name, $lastname) { } // the above function has two arguments and therefore is not dynamic. I want a function without any predefined number of argument and yet be able to receive variety of arguments (of course based on its functionality.) Thanks in advance Link to comment https://forums.phpfreaks.com/topic/272778-argument-dynamic-function/ Share on other sites More sharing options...
DavidAM Posted January 7, 2013 Share Posted January 7, 2013 func_get_args Link to comment https://forums.phpfreaks.com/topic/272778-argument-dynamic-function/#findComment-1403788 Share on other sites More sharing options...
mostafatalebi Posted January 7, 2013 Author Share Posted January 7, 2013 Thanks a million Link to comment https://forums.phpfreaks.com/topic/272778-argument-dynamic-function/#findComment-1403936 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.