![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
03/07/2008, 15:56
|
![Avatar de nes24](http://static.forosdelweb.com/customavatars/avatar108567_1.gif) | | | Fecha de Ingreso: julio-2005
Mensajes: 746
Antigüedad: 19 años, 7 meses Puntos: 3 | |
Respuesta: empatar valores de dos variables Cita:
Iniciado por GatorV Hola nes24,
Puedes hacer algo así: Código PHP: $var1 = "juan,peres,18años,bogta";
$var2 = "nombre,apellido,edad,ciudad";
$var1 = explode(",",$var1);
$var2 = explode(",",$var2);
$total = count($var2);
for( $i = 0; $i < $total; $i++ ) {
$variable = $var2[$i];
$value = $var1[$i];
$$variable = $value;
}
echo $nombre;
Saludos. oye gracias, y para este caso no puede servir la funcion extrac ??? |