PHP code example of w337886915 / arr

1. Go to this page and download the library: Download w337886915/arr 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/ */

    

w337886915 / arr example snippets


$d = ['web' => [ 'id' => 1, 'url' => 'abc.com' ]];
Arr::get($d,'web.url');

$d = ['id' => 1,'url' => 'acb.com','name'=>'后盾人'];
print_r(Arr::getExtName($d,['id','url']));

$data = array('name'=>'w337886915',array('url'=>'baidu.com'));
$data = Arr::keyCase($data,1); 
第2个参数为类型: 1 大写  0 小写

$data = ['status'=>'1','click'=>'200'];
$d = \w337886915\arr\Arr::stringToInt($data); 

$d = [ 'id' => 1, 'url' => 'w337886915.com','title'=>'测试内容' ];
print_r(Arr::filterKeys($d,['id','url']));
//过滤 下标为 id 的元素

$d = [ 'id' => 1, 'url' => 'w337886915.com','title'=>'测试内容' ];
print_r(Arr::filterKeys($d,['id'],0));
//只显示id与title 的元素

Arr::descarte($arr, $tmp = array())