| 
 Posted by J.O. Aho on 10/21/07 07:11 
zapzap wrote: 
> Hello :-) 
>  
> Is it possible to pass all arguments to another function? 
>  
> function A() 
> { 
> 	B(func_get_args()); 
> } 
>  
> function B() 
> { 
> 	var_dump(func_get_args()); 
> } 
>  
>  
> I dont know how many arguments will come for A, and i want 
> A to handle them transparent and pass all to B. 
> Now i'm doing this with func_get_args but I get 
> an array ob B's input. original arguments would be 
> better.  Is this possible in any way? 
 
function b($array) { 
	if(is_array($array)) { 
		foreach($array AS $var) { 
			var_dump($var); 
		} 
	} else { 
		var_dump($array); 
	} 
} 
 
 
--  
 
  //Aho
 
  
Navigation:
[Reply to this message] 
 |