Ver Mensaje Individual
  #23 (permalink)  
Antiguo 28/05/2008, 16:48
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Meter variable como matriz en un array??

Prueba así:
Código PHP:
<?php 
session_start
();
if( !isset( 
$_SESSION['datos'] ) ) {
      
$_SESSION['datos'] = array();
}

$arr = array( $_GET['ref'], $_GET['nombre'], $_GET['descricate'], $_GET['codven'] );
$_SESSION['datos'][$_GET['ref']] = $arr;

foreach(
$_SESSION['datos'] as $ref => $a){
     
"$ref: <br />";
     foreach( 
$a as $valor ) {
             echo 
"$valor<br />";
     }
}


?>
Saludos.