lucasantarella/array_keys_recursive
最新稳定版本:1.0.0
Composer 安装命令:
composer require lucasantarella/array_keys_recursive
包简介
Library to get array keys of a multidimensional array, retaining the original array structure.
README 文档
README
Description
A simple library for getting the array_keys() of a multidimensional array.
Installation
Composer
$ composer require lucasantarella/php-array-keys-recursive
Usage
<?php require_once __DIR__ . '/vendor/autoload.php'; $input = [ '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);
Result
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,
),
),
),
),
)
统计信息
- 总下载量: 1.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0
- 更新时间: 2017-11-25