original_string: public static function asort_array_of_arrays_by_key(array &$array, $key, $sortflag = core_collator::SORT_STRING) {
          $original = $array;
          foreach ($array as $initkey => $item) {
              $array[$initkey] = $item[$key];
          }
          $result = self::asort($array, $sortflag);
          self::restore_array($array, $original);
          return $result;
      }
code: public static function asort_array_of_arrays_by_key(array &$array, $key, $sortflag = core_collator::SORT_STRING) {
          $original = $array;
          foreach ($array as $initkey => $item) {
              $array[$initkey] = $item[$key];
          }
          $result = self::asort($array, $sortflag);
          self::restore_array($array, $original);
          return $result;
      }
code_tokens: public static function asort_array_of_arrays_by_key ( array & $ array , $ key , $ sortflag = core_collator :: SORT_STRING ) { $ original = $ array ; foreach ( $ array as $ initkey => $ item ) { $ array [ $ initkey ] = $ item [ $ key ] ; } $ result = self :: asort ( $ array , $ sortflag ) ; self :: restore_array ( $ array , $ original ) ; return $ result ; }
docstring: Locale aware sort of array of arrays.
  
  Given an array like:
  $array = array(
  array('name' => 'bravo'),
  array('name' => 'charlie'),
  array('name' => 'alpha')
  );
  
  If you call:
  core_collator::asort_array_of_arrays_by_key($array, 'name')
  
  You will be returned $array sorted by the name key of the subarrays. e.g.
  $array = array(
  array('name' => 'alpha'),
  array('name' => 'bravo'),
  array('name' => 'charlie')
  );
  
  @param array $array An array of objects to sort (handled by reference)
  @param string $key The key to use for comparison
  @param int $sortflag One of
  core_collator::SORT_NUMERIC,
  core_collator::SORT_STRING,
  core_collator::SORT_NATURAL,
  core_collator::SORT_REGULAR
  optionally "|" core_collator::CASE_SENSITIVE
  @return bool True on success
docstring_tokens: Locale aware sort of array of arrays .