PHP code example of dirkuu / array-reindex

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

    

dirkuu / array-reindex example snippets


/**
 * Sets new indexes for every element using values from passed column name
 *
 * @param array $array
 * @param mixed $columnName
 * @return array
 */
function array_reindex(array $array, $columnName): array