Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
/ array_reindex Public archive

A simple function I often use in methods returning records from database with "id" columns to make access easier in future

License

Notifications You must be signed in to change notification settings

wjezowski/array_reindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

array_reindex

Installation via "composer require"

composer require dirkuu/array-reindex

Usage

array_reindex

/**
 * 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

About

A simple function I often use in methods returning records from database with "id" columns to make access easier in future

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages