PHP code example of lucasantarella / array_keys_recursive

1. Go to this page and download the library: Download lucasantarella/array_keys_recursive library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lucasantarella / array_keys_recursive example snippets




t = [
    'person' => [
        'name' => [
            'first' => 'Luca',
            'middle' => 'Michele',
            'last' => 'Santarella'
        ],
        'dob' => '11/11/1999',
        'knowledge' => [
            'programming' => [
                'languages' => [
                    'PHP',
                    'JS',
                    'HTML',
                    'SQL',
                    'JAVA'
                ]
            ]
        ]
    ]
];

$output = \LucaSantarella\ArrayKeysRecursive::getKeys($input);
bash
$ composer 
text
array (
  'person' => 
  array (
    'name' => 
    array (
      0 => 'first',
      1 => 'middle',
      2 => 'last',
    ),
    0 => 'dob',
    'knowledge' => 
    array (
      'programming' => 
      array (
        'languages' => 
        array (
          0 => 0,
          1 => 1,
          2 => 2,
          3 => 3,
          4 => 4,
        ),
      ),
    ),
  ),
)