Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/09/2007, 17:11
Avatar de Seppo
Seppo
 
Fecha de Ingreso: marzo-2005
Ubicación: Buenos Aires, Argentina
Mensajes: 1.284
Antigüedad: 19 años, 1 mes
Puntos: 17
Re: Se pude enviar n cantidad de variables en una funciòn?

Tenés un par de opciones... la tradicional es asignarle valores por defecto

Código PHP:
function algo(parametro1 NULLparametro2 NULLparametro3 NULLparametro4 NULLparametro5 NULL)
{
// ...

Aunque es todavía más flexible utilizar func_get_args

Código PHP:
function algo()
{
var_dump(func_get_args());
// ...