Re: [PHP] pass by reference variable length args

2010-01-05 Thread Robert Cummings
viraj wrote: if func_get_args supports pass by reference, we could have avoid the loop and pre-defined arg list. something like.. extract(func_get_args) :D Absolute! I'm not sure why there isn't some kind of way to retrieve a reference in this manner, but I suspect it's related to knowing

Re: [PHP] pass by reference variable length args

2010-01-05 Thread viraj
if func_get_args supports pass by reference, we could have avoid the loop and pre-defined arg list. something like.. extract(func_get_args) :D cheers! ~viraj On Wed, Jan 6, 2010 at 11:04 AM, viraj wrote: > thanks rob! > > here goes the working method. > > public function bind_result(&$arg1=

Re: [PHP] pass by reference variable length args

2010-01-05 Thread viraj
thanks rob! here goes the working method. public function bind_result(&$arg1=null,&$arg2=null,&$arg3=null) { $numArgs = func_num_args(); $args = array(); for ($i=1; $i<= $numArgs; $i++) { $args['arg' . $i] = &${'arg'.$i};

Re: [PHP] pass by reference variable length args

2010-01-05 Thread Robert Cummings
viraj wrote: hi all, i'm trying to write a wrapper function for "mysqli_stmt_bind_results". and expect it to work the same way it accepts and bind results to the original function. the problem is, i couldn't find a way to pass the args by reference via func_get_args and register the out put from