Anonymous
public php v1 · immutableusort($mydata, buildSorter(3));function buildSorter($key) { return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; }usort($mydata, buildSorter(3));function buildSorter($key) { return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; }