Advertisement
ph4x35ccb

Exemplo pratico de array multidimencional

Feb 26th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. // como uso a versao 7.2 gerou erro
  4. $clientes = [
  5.     [
  6.         'nome' => 'leonardo',
  7.         'endereco' => 'Rua tanaua, 23',
  8.         'telefones' => [
  9.             'residencial' => '2222-2222',
  10.             'comercila'   => '5555-5555'
  11.         ]
  12.          
  13.     ]
  14. ];
  15. echo $clientes [0] ['nome'];
  16. echo '<br>';
  17. echo $clientes [0][telefones][residencial];
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement