[PHP] Passing variable number of parameters by reference

2005-05-12 Thread Robert Meyer
Hello, Using: PHP Version 5.0.3 I build the following function: function Set4HTMLOut() { $C = func_num_args(); for ($I = 0; $I $C; $I++) { $A = func_get_arg($I); echo 'I['.$I.']('.strlen($A).'): '.$A.'br /'; $A = htmlspecialchars($A); echo

Re: [PHP] Passing variable number of parameters by reference

2005-05-12 Thread Marek Kilimajer
I believe it's mentioned somewhere in the manual you can't do that. func_get_arg() always return a copy. You can workaround this using an array. Robert Meyer wrote: Hello, Using: PHP Version 5.0.3 I build the following function: function Set4HTMLOut() { $C = func_num_args(); for