Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save YurePereira/b3204f6183f427978b93055d73cff544 to your computer and use it in GitHub Desktop.

Select an option

Save YurePereira/b3204f6183f427978b93055d73cff544 to your computer and use it in GitHub Desktop.
Criando Array associativo com índice geredo automaticamente.
<?php
$myArray = array(
'nome' => 'João',
100,
'sobrenome' => 'Carlos',
'idade' => 30,
'telefone' => '3345-4233',
9
);
$myArray[] = 100;
$myArray['celular'] = '5322-3434';
$myArray[50] = 50;
$myArray[] = 10;
print_r($myArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment