fork download
  1. <?php
  2. $coches = [
  3. 'Toyota' => [
  4. 'Modelo' => 'Corolla',
  5. 'Precio' => '15.400',
  6. 'Color' => 'Azul'
  7. ]
  8. ];
  9.  
  10. foreach ($coches as $marca => $detalles){
  11. echo strtoupper($marca) . "\n";
  12.  
  13. foreach ($detalles as $clave => $valor){
  14. echo $clave . ': ' . $valor . "\n";
  15. }
  16. }
Success #stdin #stdout 0.02s 23740KB
stdin
Standard input is empty
stdout
TOYOTA
Modelo: Corolla
Precio: 15.400
Color: Azul