Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/07/2013, 19:26
wilsonlazo
 
Fecha de Ingreso: julio-2013
Mensajes: 60
Antigüedad: 10 años, 9 meses
Puntos: 0
Respuesta: Recorrer arreglo

me sale error el array lo tengo almacenado en una variable de sesión

que es asi:
Array (
[12] => Array ( [0] => 4 [1] => rrrrr [2] => 60 )
[14] => Array ( [0] => 1 [1] => ffffff [2] => 60 )
[15] => Array ( [0] => 3 [1] => yyyy [2] => 50 ) )
y esto quiero mostrar en un tabla:
esto es mi código:
<table width="100%">
<tr>
<td><h5>Productos</h5></td>
</tr>
<tr>
<td>Producto</td>
<td>Cantidad</td>
<td>Precio</td>
<td>SubTotal</td>
</tr>
<tr>
<?php if(isset($_SESSION['wilson'])){
$arry=$_SESSION['wilson'];
?>
<?php foreach($arry as $i =>$v ){
foreach($v as $in =>$element ){
?>
<td><?php echo [$i][$in]= $element ;?></td>
<td></td>
<td></td>
<td></td>
<?php } } ?>
<?php }

else {
$arry=false;
}
?>

</tr>
</table>