From: Alby L. <al...@th...> - 2001-07-05 19:58:40
|
I'm still working on the sql call stuff, and need a question answered. As you can imagine - some calls will have 3 arguments (3 vars to be inserted into a table) and others will have more or less, depending on the table size. My php manual says that user-defined functions can be passed variable amount of arguments using the following functions: func_num_args(), func_get_arg(), and func_get_args() but doesn't give any examples at all. What would the syntax be? function ($array) { $i = func_num_args(); for ($j=0; $j < $i; $j++) { $arg_x = "arg_" . $i; ${$arg_x} = $array[$j]; } something tells me that won't work but I'll give it a shot anyhoo. Albert al...@th... |