Function __global->sort_maps_by__strlen

Definitions

sources/global3.php

  • Sort a list of maps by the string length of a particular key ID in the maps.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$rows array No No required parameter N/A N/A List of maps to sort
$sort_key mixed No No required parameter N/A N/A Either an integer sort key (to sort by integer key ID of contained arrays) or a String sort key (to sort by string key ID of contained arrays)

Preview

Code (PHP)

/**
 * Sort a list of maps by the string length of a particular key ID in the maps.
 *
 * @param  array $rows List of maps to sort
 * @param  mixed $sort_key Either an integer sort key (to sort by integer key ID of contained arrays) or a String sort key (to sort by string key ID of contained arrays)
 */

function sort_maps_by__strlen(array $rows, $sort_key)