Tema
:
Funcion Swap (Intercambio) de variables
Ver Mensaje Individual
#
3
(
permalink
)
13/01/2008, 01:19
GatorV
$this->role('moderador');
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 9 meses
Puntos: 2135
Re: Funcion Swap (Intercambio) de variables
Solo es cuestion de pasar la REFERENCIA a tu funcion:
Código PHP:
function
swap
(&
$a
,&
$b
)
{
$aux
=
$a
;
$a
=
$b
;
$b
=
$aux
;
}
Saludos.
GatorV
Ver Perfil
Buscar todos los Mensajes de GatorV