Function __global->sort_maps_by

Definitions

sources/global3.php

  • Sort a list of maps by a particular key ID in the maps. Does not (and should not) preserve list indices, but does preserve associative key indices.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: N/A

Parameters

Name Type Default Set Range Description
$rows array required parameter N/A N/A List of maps to sort
$sort_keys mixed required parameter N/A N/A Either an integer sort key (to sort by integer key ID of contained arrays) or a Comma-separated list of sort keys (to sort by string key ID of contained arrays; prefix '!' a key to reverse the sort order for it)
$preserve_order_if_possible boolean False N/A N/A Don't shuffle order unnecessarily (i.e. do a merge sort)
$natural boolean False N/A N/A Whether to do a natural sort